--- a/RegressionTests__BlockTest.st Thu Aug 31 13:10:19 2000 +0200
+++ b/RegressionTests__BlockTest.st Thu Aug 31 13:12:02 2000 +0200
@@ -1,5 +1,7 @@
"{ Package: 'exept:regression' }"
+"{ NameSpace: RegressionTests }"
+
Object subclass:#BlockTest
instanceVariableNames:''
classVariableNames:''
@@ -14,9 +16,9 @@
|b|
b := [:argList | Transcript
- show:'invoked with args:';
- showCR:argList
- ] asVarArgBlock.
+ show:'invoked with args:';
+ showCR:argList
+ ] asVarArgBlock.
^ b
@@ -26,10 +28,10 @@
|b|
b := [:argList | Transcript
- show:'invoked with args:';
- showCR:argList.
- argList
- ] asVarArgBlock.
+ show:'invoked with args:';
+ showCR:argList.
+ argList
+ ] asVarArgBlock.
^ b
@@ -39,10 +41,10 @@
|b|
b := [:argList | Transcript
- show:'invoked with args:';
- showCR:argList.
- argList size
- ] asVarArgBlock.
+ show:'invoked with args:';
+ showCR:argList.
+ argList size
+ ] asVarArgBlock.
^ b
@@ -63,9 +65,9 @@
b value.
b code notNil ifTrue:[
- Transcript showCR:'blocks code is jitted'
+ Transcript showCR:'blocks code is jitted'
] ifFalse:[
- Transcript showCR:'*** blocks code is NOT jitted'
+ Transcript showCR:'*** blocks code is NOT jitted'
].
b value.
@@ -84,9 +86,9 @@
b value.
b code notNil ifTrue:[
- Transcript showCR:'blocks code is jitted'
+ Transcript showCR:'blocks code is jitted'
] ifFalse:[
- Transcript showCR:'*** blocks code is NOT jitted'
+ Transcript showCR:'*** blocks code is NOT jitted'
].
b value = #() ifFalse:[ self halt ].
@@ -115,9 +117,9 @@
b value.
b code notNil ifTrue:[
- Transcript showCR:'blocks code is jitted'
+ Transcript showCR:'blocks code is jitted'
] ifFalse:[
- Transcript showCR:'*** blocks code is NOT jitted'
+ Transcript showCR:'*** blocks code is NOT jitted'
].
b value = 0 ifFalse:[ self halt ].
--- a/RegressionTests__CompilerTest.st Thu Aug 31 13:10:19 2000 +0200
+++ b/RegressionTests__CompilerTest.st Thu Aug 31 13:12:02 2000 +0200
@@ -1,5 +1,7 @@
"{ Package: 'exept:regression' }"
+"{ NameSpace: RegressionTests }"
+
Object subclass:#CompilerTest
instanceVariableNames:'value'
classVariableNames:''
--- a/RegressionTests__IntegerTest.st Thu Aug 31 13:10:19 2000 +0200
+++ b/RegressionTests__IntegerTest.st Thu Aug 31 13:12:02 2000 +0200
@@ -1,5 +1,7 @@
"{ Package: 'exept:regression' }"
+"{ NameSpace: RegressionTests }"
+
Object subclass:#IntegerTest
instanceVariableNames:''
classVariableNames:''
@@ -437,7 +439,7 @@
test:aBlock
aBlock value == true ifFalse:[
- self halt:'test failed'
+ self halt:'test failed'
]
!
@@ -579,28 +581,28 @@
self testPrinting1.
SmallInteger maxBytes == 4 ifTrue:[
- self test:[minVal hexPrintString = '-40000000'].
- self test:[maxVal hexPrintString = '3FFFFFFF'].
- self test:[minVal == -1073741824].
- self test:[maxVal == 1073741823].
- maxValPlus1 := 1073741824.
- minValMinus1 := -1073741825.
- self test:[minValMinus1 hexPrintString = '-40000001'].
- self test:[maxValPlus1 hexPrintString = '40000000'].
- halfMin := -16r20000000.
- halfMax := 16r20000000.
+ self test:[minVal hexPrintString = '-40000000'].
+ self test:[maxVal hexPrintString = '3FFFFFFF'].
+ self test:[minVal == -1073741824].
+ self test:[maxVal == 1073741823].
+ maxValPlus1 := 1073741824.
+ minValMinus1 := -1073741825.
+ self test:[minValMinus1 hexPrintString = '-40000001'].
+ self test:[maxValPlus1 hexPrintString = '40000000'].
+ halfMin := -16r20000000.
+ halfMax := 16r20000000.
].
SmallInteger maxBytes == 8 ifTrue:[
- self test:[minVal hexPrintString = '-4000000000000000'].
- self test:[maxVal hexPrintString = '3FFFFFFFFFFFFFFF'].
- self test:[minVal == -4611686018427387904].
- self test:[maxVal == 4611686018427387903].
- maxValPlus1 := 4611686018427387904.
- minValMinus1 := -4611686018427387905.
- self test:[minValMinus1 hexPrintString = '-4000000000000001'].
- self test:[maxValPlus1 hexPrintString = '4000000000000000'].
- halfMin := -16r2000000000000000.
- halfMax := 16r2000000000000000.
+ self test:[minVal hexPrintString = '-4000000000000000'].
+ self test:[maxVal hexPrintString = '3FFFFFFFFFFFFFFF'].
+ self test:[minVal == -4611686018427387904].
+ self test:[maxVal == 4611686018427387903].
+ maxValPlus1 := 4611686018427387904.
+ minValMinus1 := -4611686018427387905.
+ self test:[minValMinus1 hexPrintString = '-4000000000000001'].
+ self test:[maxValPlus1 hexPrintString = '4000000000000000'].
+ halfMin := -16r2000000000000000.
+ halfMax := 16r2000000000000000.
].
"arithmetic overFlow checks"
@@ -694,14 +696,14 @@
self test:[
(((0 to:64) collect:[:s | 1 bitShift:s])
- collect:[:n | n highBit]) = (1 to:65)
+ collect:[:n | n highBit]) = (1 to:65)
].
1 to:10000 do:[:s |
- self test:[ (1 bitShift:s) highBit == (s+1) ]
+ self test:[ (1 bitShift:s) highBit == (s+1) ]
].
1 to:10000 do:[:s |
- self test:[ ((1 bitShift:s) - 1) highBit == s ]
+ self test:[ ((1 bitShift:s) - 1) highBit == s ]
].
"
@@ -1143,9 +1145,9 @@
self test:[t compressed = 20 factorial].
self test:[|v|
- v := 100 factorial copy.
- v absSubtract:99 factorial.
- v compressed = (100 factorial - 99 factorial)].
+ v := 100 factorial copy.
+ v absSubtract:99 factorial.
+ v compressed = (100 factorial - 99 factorial)].
"Large // Large division"
self test:[(20 factorial // 19 factorial) == 20].
@@ -1184,12 +1186,12 @@
t1 := 100000.
SmallInteger maxBytes == 4 ifTrue:[
- self test:[t1 * t1 = 10000000000].
- self test:[(t1 perform:'*' asSymbol with:t1) = 10000000000].
+ self test:[t1 * t1 = 10000000000].
+ self test:[(t1 perform:'*' asSymbol with:t1) = 10000000000].
].
SmallInteger maxBytes == 8 ifTrue:[
- self test:[t1 * t1 == 10000000000].
- self test:[(t1 perform:'*' asSymbol with:t1) == 10000000000].
+ self test:[t1 * t1 == 10000000000].
+ self test:[(t1 perform:'*' asSymbol with:t1) == 10000000000].
].
self test:[(t1 * t1) printString = '10000000000'].
@@ -1420,11 +1422,11 @@
"addition with overflow"
SmallInteger maxBytes == 4 ifTrue:[
- n1 := 16r3FFFFFFF.
- n2 := -16r40000000.
+ n1 := 16r3FFFFFFF.
+ n2 := -16r40000000.
] ifFalse:[
- n1 := 16r3FFFFFFFFFFFFFFF.
- n2 := -16r4000000000000000.
+ n1 := 16r3FFFFFFFFFFFFFFF.
+ n2 := -16r4000000000000000.
].
self test:[n1 class == SmallInteger].
self test:[n2 class == SmallInteger].
@@ -1865,9 +1867,9 @@
self test:[(n2 perform:'*' asSymbol with:2) printString = '-2147483646'].
SmallInteger maxBytes == 4 ifTrue:[
- n1 := 16r3FFFFFFF.
+ n1 := 16r3FFFFFFF.
] ifFalse:[
- n1 := 16r3FFFFFFFFFFFFFFF.
+ n1 := 16r3FFFFFFFFFFFFFFF.
].
self test:[n1 class == SmallInteger].
self test:[(n1 * 2) class == LargeInteger].