--- a/RegressionTests__IntegerTest.st Sat May 15 00:22:24 1999 +0200
+++ b/RegressionTests__IntegerTest.st Thu May 20 09:41:15 1999 +0200
@@ -35,7 +35,10 @@
!IntegerTest class methodsFor:'tests'!
test1
- "general conversion & tests"
+ "general conversion & arithmetic tests.
+ Notice, the arithmetic tests are both performed via regular sends
+ and via constructed performs. The reason is to test both inlined
+ JIT-compiler code AND the regular methods code."
|minVal maxVal maxValPlus1 minValMinus1 halfMin halfMax t t1 t2|
@@ -109,16 +112,21 @@
"multiplication"
t1 := 100.
self test:[t1 * t1 == 10000].
+ self test:[(t1 perform:'*' asSymbol with:t1) == 10000].
t1 := 1000.
self test:[t1 * t1 == 1000000].
+ self test:[(t1 perform:'*' asSymbol with:t1) == 1000000].
t1 := 10000.
self test:[t1 * t1 == 100000000].
+ self test:[(t1 perform:'*' asSymbol with:t1) == 100000000].
t1 := 100000.
SmallInteger maxBytes == 4 ifTrue:[
- self test:[t1 * 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 perform:'*' asSymbol with:t1) printString = '10000000000'].
@@ -141,6 +149,8 @@
"Large * Large multiplication"
self test:[(20 factorial * 20 factorial) printString = '5919012181389927685417441689600000000'].
t := 20 factorial.
+
+ "Large // SmallInt division"
t := t // 20.
self test:[t printString = 19 factorial printString].
t := t // 19.
@@ -182,6 +192,8 @@
"
self test1
"
+
+ "Modified: / 20.5.1999 / 09:36:22 / cg"
!
testPrinting1