#UI_ENHANCEMENT
authorClaus Gittinger <cg@exept.de>
Thu, 10 Mar 2016 13:14:51 +0100
changeset 1344 1552f03fe63a
parent 1343 ba3eb5aac709
child 1345 e890cf9dd4cd
#UI_ENHANCEMENT class: RegressionTests::STCCompilerTests comment/format in: #test10_bitor_bug changed: #test_LongIntegerArray_02 #test_LongIntegerArray_03
RegressionTests__STCCompilerTests.st
--- a/RegressionTests__STCCompilerTests.st	Wed Mar 09 20:10:16 2016 +0100
+++ b/RegressionTests__STCCompilerTests.st	Thu Mar 10 13:14:51 2016 +0100
@@ -283,6 +283,7 @@
 
     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].
@@ -432,7 +433,9 @@
 !
 
 test_LongIntegerArray_02
-    |sizes|
+    |sizes verbose|
+
+    verbose := false.
 
     [
         Class 
@@ -474,10 +477,12 @@
                     skipIfSame:false
                     silent:true.
                 1 to:100 do:[:i | 
-                    ('Pass ' , i printString) errorPrintCR.
+                    verbose ifTrue:[
+                        ('Pass ' , i printString) errorPrintCR.
+                    ].    
                     sizes := self class perform:#'longIntegerArray_i_element'.
-                    self assert:(sizes first = 11123456789).
-                    self assert:(sizes second = 11123456789).
+                    self assert:(sizes first = 11123456789) description:('failed in pass ',i printString).
+                    self assert:(sizes second = 11123456789) description:('failed in pass ',i printString).
                 ].
                 self class class removeSelector:#'longIntegerArray_i_element'.
             ].
@@ -491,17 +496,32 @@
 !
 
 test_LongIntegerArray_03
-    |arr scaveneges|
+    "does many scavenges to check if the moved LongIntegerArray remains at
+     an aligned address"
+     
+    |verbose arr scaveneges|
 
-    ('=====') errorPrintCR.
+    verbose := false.
+    
+    verbose ifTrue:[ 
+        ('=====') errorPrintCR 
+    ].
+
     arr := LongIntegerArray new:8.
     arr at:1 put:11123456789.
     arr at:8 put:11123456789.
     self assert:(arr at:1) = 11123456789.
     self assert:(arr at:8) = 11123456789.
-    ('   arr = 0x' , (ObjectMemory addressOf:arr) hexPrintString) errorPrintCR.
+
+    verbose ifTrue:[ 
+        ('   arr = 0x' , (ObjectMemory addressOf:arr) hexPrintString) errorPrintCR.
+    ].
+    
     1 to:100 do:[:i | 
-        ('Pass ' , i printString) errorPrintCR.
+        verbose ifTrue:[ 
+            ('Pass ' , i printString) errorPrintCR.
+        ].
+        
         scaveneges := ObjectMemory scavengeCount.
         [
             scaveneges == ObjectMemory scavengeCount
@@ -509,12 +529,16 @@
             "/ Allocate some gagbage"
             Array new:(Random nextIntegerBetween:1 and:100)
         ].
-        ('B: arr = 0x' , (ObjectMemory addressOf:arr) hexPrintString) errorPrintCR.
-        ('   arr at: 1 ==> ' , (arr at:1) printString) errorPrintCR.
-        ('   arr at: 8 ==> ' , (arr at:8) printString) errorPrintCR.
-        self assert:(arr at:1) = 11123456789.
-        self assert:(arr at:8) = 11123456789.
-        ('A: arr = 0x' , (ObjectMemory addressOf:arr) hexPrintString) errorPrintCR.
+        verbose ifTrue:[ 
+            ('B: arr = 0x' , (ObjectMemory addressOf:arr) hexPrintString) errorPrintCR.
+            ('   arr at: 1 ==> ' , (arr at:1) printString) errorPrintCR.
+            ('   arr at: 8 ==> ' , (arr at:8) printString) errorPrintCR.
+        ].
+        self assert:(arr at:1) = 11123456789 description:('failed in pass ',i printString).
+        self assert:(arr at:8) = 11123456789 description:('failed in pass ',i printString).
+        verbose ifTrue:[ 
+            ('A: arr = 0x' , (ObjectMemory addressOf:arr) hexPrintString) errorPrintCR.
+        ]
     ]
 
     "