RegressionTests__FloatTest.st
changeset 1878 1b8f50bc363e
parent 1861 c75410027243
child 1915 af63d419f526
--- a/RegressionTests__FloatTest.st	Wed Oct 18 14:53:16 2017 +0200
+++ b/RegressionTests__FloatTest.st	Wed Oct 18 14:53:22 2017 +0200
@@ -408,8 +408,7 @@
 !
 
 test05_Comparing
-    |convArray check v1 v2 v1b 
-     compiledMethod|
+    |convArray check v1 v2 v1b|
 
     convArray := OrderedCollection new.
     convArray addAll:#(yourself asInteger asFloat asShortFloat asLongFloat).
@@ -454,38 +453,38 @@
     check value:-1 value:30.
 
     "/ test fails when stc code, jit code works
-    compiledMethod := self class compiledMethodAt:#'test05_Comparing'.
-    (compiledMethod notNil 
-    and:[compiledMethod byteCode isNil]) ifTrue:[ 
-        "/ stc-compiled code handles not slightly differently
-        "/ listed compares will fail
-        'FloatTest >> test05_Comparing: test with 200000000000000000000 or similiar are skipped due would fail when stc code' infoPrintCR.
-    ] ifFalse:[    
-        self assert:( 200000000000000000000.0 = 200000000000000000001 ).
-        self assert:( 200000000000000000000.0 = 200000000000000000000 ).
-        self assert:( 200000000000000000000.0 asLongFloat = 200000000000000000000 ).
+    (Helper 
+        isStcCompiledMethod:#'test05_Comparing'
+        in:self) ifTrue:[ 
+            "/ stc-compiled code handles not slightly differently
+            "/ listed compares will fail
+            'FloatTest >> test05_Comparing: test with 200000000000000000000 or similiar are skipped due would fail when stc code' infoPrintCR.
+        ] ifFalse:[    
+            self assert:( 200000000000000000000.0 = 200000000000000000001 ).
+            self assert:( 200000000000000000000.0 = 200000000000000000000 ).
+            self assert:( 200000000000000000000.0 asLongFloat = 200000000000000000000 ).
 
-        self assert:( 200000000000000000000 = 200000000000000000000.0).
-        self assert:( 200000000000000000000 = 200000000000000000000.0 asLongFloat ).
+            self assert:( 200000000000000000000 = 200000000000000000000.0).
+            self assert:( 200000000000000000000 = 200000000000000000000.0 asLongFloat ).
 
-        self assert:( 200000000000000000000.0 < 200000100000000000000 ).
-        self assert:( 200000000000000000000.0 asLongFloat < 200000000000100000000 ).
-        self assert:( 200000000000000000000.0 asShortFloat < 200001000000000000000 ).
+            self assert:( 200000000000000000000.0 < 200000100000000000000 ).
+            self assert:( 200000000000000000000.0 asLongFloat < 200000000000100000000 ).
+            self assert:( 200000000000000000000.0 asShortFloat < 200001000000000000000 ).
 
-        self assert:( 200000000000000000000 < 200001000000000000000.0).
-        self assert:( 200000000000000000000 < 200001000000000000000.0 asLongFloat ).
-        self assert:( 200000000000000000000 < 200001000000000000000.0 asShortFloat ).
+            self assert:( 200000000000000000000 < 200001000000000000000.0).
+            self assert:( 200000000000000000000 < 200001000000000000000.0 asLongFloat ).
+            self assert:( 200000000000000000000 < 200001000000000000000.0 asShortFloat ).
 
-        self assert:( 200000000000000000000.0 <= 200000100000000000000 ).
-        self assert:( 200000000000000000000.0 <= 200000000000000000000 ).
-        self assert:( 200000000000000000000.0 asLongFloat <= 200000000000000000001 ).
-        self assert:( 200000000000000000000.0 asLongFloat <= 200000000000000000000 ).
+            self assert:( 200000000000000000000.0 <= 200000100000000000000 ).
+            self assert:( 200000000000000000000.0 <= 200000000000000000000 ).
+            self assert:( 200000000000000000000.0 asLongFloat <= 200000000000000000001 ).
+            self assert:( 200000000000000000000.0 asLongFloat <= 200000000000000000000 ).
 
-        self assert:( 200000000000000000000 <= 200001000000000000000.0).
-        self assert:( 200000000000000000000 <= 200000000000000000000.0).
-        self assert:( 200000000000000000000 <= 200001000000000000000.0 asLongFloat ).
-        self assert:( 200000000000000000000 <= 200000000000000000000.0 asLongFloat ).
-    ].
+            self assert:( 200000000000000000000 <= 200001000000000000000.0).
+            self assert:( 200000000000000000000 <= 200000000000000000000.0).
+            self assert:( 200000000000000000000 <= 200001000000000000000.0 asLongFloat ).
+            self assert:( 200000000000000000000 <= 200000000000000000000.0 asLongFloat ).
+        ].
 
     self assert:( 2000000.0 asShortFloat = 2000000 ).
     self assert:( 2000000 = 2000000.0 asShortFloat ).