Author: gclayton
Date: Thu Nov  6 12:39:39 2014
New Revision: 221468

URL: http://llvm.org/viewvc/llvm-project?rev=221468&view=rev
Log:
Pick better floating point numbers (ones that can be exactly represented) in 
floating point instead of something that can't to avoid test suite failures on 
different devices and architectures.

<rdar://problem/18826900>

Modified:
    lldb/trunk/test/lang/c/set_values/TestSetValues.py
    lldb/trunk/test/lang/c/set_values/main.c

Modified: lldb/trunk/test/lang/c/set_values/TestSetValues.py
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/set_values/TestSetValues.py?rev=221468&r1=221467&r2=221468&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/set_values/TestSetValues.py (original)
+++ lldb/trunk/test/lang/c/set_values/TestSetValues.py Thu Nov  6 12:39:39 2014
@@ -99,12 +99,12 @@ class SetValuesTestCase(TestBase):
         # main.c:78
         # Check that 'frame variable --show-types' displays the correct data 
type and value.
         self.expect("frame variable --show-types", 
VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = "(double) i = 3.14159")
+            startstr = "(double) i = 2.25")
 
         # Now set variable 'i' and check that it is correctly displayed.
-        self.runCmd("expression i = 3.14")
+        self.runCmd("expression i = 1.5")
         self.expect("frame variable --show-types", 
VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = "(double) i = 3.14")
+            startstr = "(double) i = 1.5")
 
         self.runCmd("continue")
 
@@ -113,12 +113,12 @@ class SetValuesTestCase(TestBase):
         # rdar://problem/8422727
         # set_values test directory: 'frame variable' shows only (long double) 
i =
         self.expect("frame variable --show-types", 
VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = "(long double) i = 3.14159")
+            startstr = "(long double) i = 2.25")
 
         # Now set variable 'i' and check that it is correctly displayed.
-        self.runCmd("expression i = 3.1")
+        self.runCmd("expression i = 1.5")
         self.expect("frame variable --show-types", 
VARIABLES_DISPLAYED_CORRECTLY,
-            startstr = "(long double) i = 3.1")
+            startstr = "(long double) i = 1.5")
 
 
 if __name__ == '__main__':

Modified: lldb/trunk/test/lang/c/set_values/main.c
URL: 
http://llvm.org/viewvc/llvm-project/lldb/trunk/test/lang/c/set_values/main.c?rev=221468&r1=221467&r2=221468&view=diff
==============================================================================
--- lldb/trunk/test/lang/c/set_values/main.c (original)
+++ lldb/trunk/test/lang/c/set_values/main.c Thu Nov  6 12:39:39 2014
@@ -66,21 +66,21 @@ void set_ulong(void)
 
 void set_float(void)
 {
-    float i = 3.1415927;
+    float i = 2.25;
     printf("before (float) i = %g\n", i);
     printf("after  (float) i = %g\n", i);   //// break $source:$line
 }
 
 void set_double(void)
 {
-    double i = 3.1415927;
+    double i = 2.25;
     printf("before (double) i = %g\n", i);
     printf("after  (double) i = %g\n", i);  // Set break point #4. //// break 
$source:$line
 }
 
 void set_long_double(void)
 {
-    long double i = 3.1415927;
+    long double i = 2.25;
     printf("before (long double) i = %Lg\n", i);
     printf("after  (long double) i = %Lg\n", i);    // Set break point #5. 
//// break $source:$line
 }


_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits

Reply via email to