[Lldb-commits] [lldb] r191101 - Add an xfail test as 'expr myfloat' can add digits consistent

Ashok Thirumurthi ashok.thirumurthi at intel.com
Fri Sep 20 12:01:21 PDT 2013


Author: athirumu
Date: Fri Sep 20 14:01:20 2013
New Revision: 191101

URL: http://llvm.org/viewvc/llvm-project?rev=191101&view=rev
Log:
Add an xfail test as 'expr myfloat' can add digits consistent
with the closest available 32-bit floating point representation.

Modified:
    lldb/trunk/test/expression_command/test/TestExprs.py

Modified: lldb/trunk/test/expression_command/test/TestExprs.py
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/test/expression_command/test/TestExprs.py?rev=191101&r1=191100&r2=191101&view=diff
==============================================================================
--- lldb/trunk/test/expression_command/test/TestExprs.py (original)
+++ lldb/trunk/test/expression_command/test/TestExprs.py Fri Sep 20 14:01:20 2013
@@ -33,7 +33,7 @@ class BasicExprCommandsTestCase(TestBase
         self.addTearDownHook(lambda: self.runCmd("settings clear auto-confirm"))
 
 
-    def test_many_expr_commands(self):
+    def build_and_run(self):
         """These basic expression commands should work as expected."""
         self.buildDefault()
 
@@ -43,6 +43,17 @@ class BasicExprCommandsTestCase(TestBase
 
         self.runCmd("run", RUN_SUCCEEDED)
 
+    @unittest2.expectedFailure # llvm.org/pr17135: APFloat::toString does not identify the correct (i.e. least) precision.
+    def test_floating_point_expr_commands(self):
+        self.build_and_run()
+
+        self.expect("expression 2.234f",
+            patterns = ["\(float\) \$.* = 2\.234"])
+        # (float) $2 = 2.234
+
+    def test_many_expr_commands(self):
+        self.build_and_run()
+
         self.expect("expression 2",
             patterns = ["\(int\) \$.* = 2"])
         # (int) $0 = 1





More information about the lldb-commits mailing list