checkin from browser
authorClaus Gittinger <cg@exept.de>
Fri, 04 Jun 1999 13:40:10 +0200
changeset 17 2573c1ad19a4
parent 16 b10bb029410d
child 18 3285f52927c2
checkin from browser
RegressionTests__IntegerTest.st
--- a/RegressionTests__IntegerTest.st	Wed Jun 02 16:30:06 1999 +0200
+++ b/RegressionTests__IntegerTest.st	Fri Jun 04 13:40:10 1999 +0200
@@ -126,7 +126,7 @@
      and via constructed performs. The reason is to test both inlined
      JIT-compiler code AND the regular methods code."
 
-    |s|
+    |s n1 n2|
 
     "Large + Large addition"
     self testReading1.
@@ -137,11 +137,38 @@
 
     "Large - Large addition"
 
+    n1 := 16r100000000. n2 := 16r7FFFFFFF.
+    self test:[(n1 - n2 ) hexPrintString = '80000001'].
+    self test:[(16r100000000 - n2 ) hexPrintString = '80000001'].
+    self test:[(n1 - 16r7FFFFFFF ) hexPrintString = '80000001'].
     self test:[(16r100000000 - 16r7FFFFFFF ) hexPrintString = '80000001'].
+
+    n1 := 16r100000000. n2 := 16r80000000.
+    self test:[(n1 - n2 ) hexPrintString = '80000000'].
+    self test:[(16r100000000 - n2 ) hexPrintString = '80000000'].
+    self test:[(n1 - 16r80000000 ) hexPrintString = '80000000'].
     self test:[(16r100000000 - 16r80000000 ) hexPrintString = '80000000'].
+
+    n1 := 16r100000000. n2 := 16rFFFFFFFF.
+    self test:[(n1 - n2 ) hexPrintString = '1'].
+    self test:[(16r100000000 - n2 ) hexPrintString = '1'].
+    self test:[(n1 - 16rFFFFFFFF ) hexPrintString = '1'].
     self test:[(16r100000000 - 16rFFFFFFFF ) hexPrintString = '1'].
-    self test:[(16r100000000 - 1 ) hexPrintString = 'FFFFFFFF'].
-    self test:[(16r100000000 - 16r10000000 ) hexPrintString = 'F0000000'].
+
+    n1 := 16r100000000. n2 := 1.
+    self test:[n1 hexPrintString printCR.
+               (n1 - n2) hexPrintString printCR.
+               (n1 - n2) hexPrintString = 'FFFFFFFF'].
+    self test:[(n1 - n2) hexPrintString = 'FFFFFFFF'].
+    self test:[(16r100000000 - n2) hexPrintString = 'FFFFFFFF'].
+    self test:[(n1 - 1) hexPrintString = 'FFFFFFFF'].
+    self test:[(16r100000000 - 1) hexPrintString = 'FFFFFFFF'].
+
+    n1 := 16r100000000. n2 := 16r10000000.
+    self test:[(n1 - n2) hexPrintString = 'F0000000'].
+    self test:[(16r100000000 - n2) hexPrintString = 'F0000000'].
+    self test:[(n1 - 16r10000000) hexPrintString = 'F0000000'].
+    self test:[(16r100000000 - 16r10000000) hexPrintString = 'F0000000'].
 
     "Large - small subtraction"
     self test:[(20 factorial + 20 factorial - 1) printString = '4865804016353279999'].
@@ -158,7 +185,7 @@
      self testLargeAddition
     "
 
-    "Modified: / 20.5.1999 / 09:41:19 / cg"
+    "Modified: / 4.6.1999 / 13:41:13 / cg"
 !
 
 testLargeDivision