RegressionTests__IntegerTest.st
changeset 26 eb5fdf34fb28
parent 25 246f4c3866a0
child 27 8386e8469cdf
--- a/RegressionTests__IntegerTest.st	Fri Jun 04 23:28:48 1999 +0200
+++ b/RegressionTests__IntegerTest.st	Sat Jun 05 00:01:37 1999 +0200
@@ -1,8 +1,8 @@
 Object subclass:#IntegerTest
-	instanceVariableNames:''
-	classVariableNames:''
-	poolDictionaries:''
-	category:'Tests - Numbers'
+        instanceVariableNames:''
+        classVariableNames:''
+        poolDictionaries:''
+        category:'Tests - Numbers'
 !
 
 
@@ -608,17 +608,27 @@
     self test:[t printString = 10 factorial printString].
     self test:[t == 10 factorial].
 
+    t := 20 factorial.
+    t := t + 21 factorial.
+    t absSubtract:21 factorial.
+    self test:[t compressed = 20 factorial].
+
+    self test:[|v|
+               v := 100 factorial copy.
+               v absSubtract:99 factorial.   
+               v compressed = (100 factorial - 99 factorial)].
+
     "Large // Large division"
-    self test:[(10000 factorial / 9999 factorial) == 10000].
-    self test:[(10000 factorial / 9999 factorial) == (10000 factorial // 9999 factorial)].
-    self test:[(20 factorial / 19 factorial) == 20].
-    self test:[(20 factorial * 21 / 20 / 21) = (19 factorial)].
+    self test:[(20 factorial // 19 factorial) == 20].
+    self test:[(20 factorial * 21 // 20 // 21) = (19 factorial)].
+    self test:[(10000 factorial // 9999 factorial) == 10000].
+    self test:[(10000 factorial // 9999 factorial) == (10000 factorial / 9999 factorial)].
 
     "
      self testLargeDivision
     "
 
-    "Modified: / 20.5.1999 / 09:41:19 / cg"
+    "Modified: / 4.6.1999 / 23:54:57 / cg"
 !
 
 testLargeMultiplication