[Lldb-commits] [lldb] r118930 - /lldb/trunk/test/set_values/TestSetValues.py

Johnny Chen johnny.chen at apple.com
Fri Nov 12 13:50:28 PST 2010


Author: johnny
Date: Fri Nov 12 15:50:28 2010
New Revision: 118930

URL: http://llvm.org/viewvc/llvm-project?rev=118930&view=rev
Log:
Implement TODO's of using expression command to set vaiables and to verify that
they are displayed correctly.

Modified:
    lldb/trunk/test/set_values/TestSetValues.py

Modified: lldb/trunk/test/set_values/TestSetValues.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/set_values/TestSetValues.py?rev=118930&r1=118929&r2=118930&view=diff
==============================================================================
--- lldb/trunk/test/set_values/TestSetValues.py (original)
+++ lldb/trunk/test/set_values/TestSetValues.py Fri Nov 12 15:50:28 2010
@@ -77,8 +77,10 @@
         self.expect("frame variable -t", VARIABLES_DISPLAYED_CORRECTLY,
             startstr = "(char) i = 'a'")
 
-        # TODO:
         # Now set variable 'i' and check that it is correctly displayed.
+        self.runCmd("expression i = \\'b\\'") # Escape the single quotes.
+        self.expect("frame variable -t", VARIABLES_DISPLAYED_CORRECTLY,
+            startstr = "(char) i = 'b'")
 
         self.runCmd("continue")
 
@@ -87,8 +89,10 @@
         self.expect("frame variable -t", VARIABLES_DISPLAYED_CORRECTLY,
             patterns = ["\((short unsigned int|unsigned short)\) i = 33"])
 
-        # TODO:
         # Now set variable 'i' and check that it is correctly displayed.
+        self.runCmd("expression i = 333")
+        self.expect("frame variable -t", VARIABLES_DISPLAYED_CORRECTLY,
+            patterns = ["\((short unsigned int|unsigned short)\) i = 333"])
 
         self.runCmd("continue")
 
@@ -97,8 +101,10 @@
         self.expect("frame variable -t", VARIABLES_DISPLAYED_CORRECTLY,
             startstr = "(long int) i = 33")
 
-        # TODO:
         # Now set variable 'i' and check that it is correctly displayed.
+        self.runCmd("expression i = 33333")
+        self.expect("frame variable -t", VARIABLES_DISPLAYED_CORRECTLY,
+            startstr = "(long int) i = 33333")
 
         self.runCmd("continue")
 
@@ -107,8 +113,10 @@
         self.expect("frame variable -t", VARIABLES_DISPLAYED_CORRECTLY,
             startstr = "(double) i = 3.14159")
 
-        # TODO:
         # Now set variable 'i' and check that it is correctly displayed.
+        self.runCmd("expression i = 3.14")
+        self.expect("frame variable -t", VARIABLES_DISPLAYED_CORRECTLY,
+            startstr = "(double) i = 3.14")
 
         self.runCmd("continue")
 
@@ -119,8 +127,10 @@
         self.expect("frame variable -t", VARIABLES_DISPLAYED_CORRECTLY,
             startstr = "(long double) i = 3.14159")
 
-        # TODO:
         # Now set variable 'i' and check that it is correctly displayed.
+        self.runCmd("expression i = 3.1")
+        self.expect("frame variable -t", VARIABLES_DISPLAYED_CORRECTLY,
+            startstr = "(long double) i = 3.1")
 
 
 if __name__ == '__main__':





More information about the lldb-commits mailing list