class: RegressionTests::STCCompilerTests
authorStefan Vogel <sv@exept.de>
Tue, 09 Apr 2013 15:24:28 +0200
changeset 894 fd92a3529be3
parent 893 bab45d7a2c6b
child 895 a6cfe201fdb9
class: RegressionTests::STCCompilerTests changed: #test10_bitor_bug
RegressionTests__STCCompilerTests.st
--- a/RegressionTests__STCCompilerTests.st	Tue Apr 09 13:37:56 2013 +0200
+++ b/RegressionTests__STCCompilerTests.st	Tue Apr 09 15:24:28 2013 +0200
@@ -43,44 +43,6 @@
 
 !STCCompilerTests methodsFor:'tests'!
 
-test01_bitor_bug
-    "checks for an stc compiler bug (detected Sep 2011).
-     stc generates bad code for the bitOr expression in nextLittleEndianNumber"
-
-    |val mthd|
-
-    Class withoutUpdatingChangesDo:[
-        self class recompile:#'nextLittleEndianNumber:from:'.
-        val := self nextLittleEndianNumber:4 from:#[1 2 3 4].
-        self assert:(val = 16r04030201).
-        val := self nextLittleEndianNumber:8 from:#[1 2 3 4 5 6 7 8].
-        self assert:(val = 16r0807060504030201).
-
-        mthd := (self class compiledMethodAt:#'nextLittleEndianNumber:from:').
-        (STCCompilerInterface new)
-            compileToMachineCode:mthd source
-            forClass:self class
-            selector:#'nextLittleEndianNumber:from:'
-            inCategory:mthd category
-            notifying:nil
-            install:true
-            skipIfSame:false
-            silent:true.
-
-        val := self nextLittleEndianNumber:4 from:#[1 2 3 4].
-        self assert:(val = 16r04030201).
-        val := self nextLittleEndianNumber:8 from:#[1 2 3 4 5 6 7 8].
-        self assert:(val = 16r0807060504030201).
-    ].
-
-    "
-     self run:#test01_bitor_bug
-     self new test01_bitor_bug
-    "
-
-    "Created: / 17-09-2011 / 10:32:18 / cg"
-!
-
 test01_compilation
     "checks for an stc compiler bug (detected Sep 2011).
      stc generates bad code for the bitOr expression in nextLittleEndianNumber"
@@ -159,7 +121,7 @@
         val := self nextLittleEndianNumber:8 from:#[1 2 3 4 5 6 7 8].
         self assert:(val = 16r0807060504030201).
 
-        mthd := (self class compiledMethodAt:#'nextLittleEndianNumber:from:').
+        mthd := self class compiledMethodAt:#'nextLittleEndianNumber:from:'.
         (STCCompilerInterface new)
             compileToMachineCode:mthd source
             forClass:self class
@@ -170,6 +132,10 @@
             skipIfSame:false
             silent:true.
 
+        self 
+            assert:mthd ~= (self class compiledMethodAt:#'nextLittleEndianNumber:from:')
+            description:'Could not compile with STC'.
+
         val := self nextLittleEndianNumber:4 from:#[1 2 3 4].
         self assert:(val = 16r04030201).
         val := self nextLittleEndianNumber:8 from:#[1 2 3 4 5 6 7 8].