*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Fri, 08 Jul 2005 11:27:11 +0200
changeset 282 c894633f5110
parent 281 2935b3c27b05
child 283 6aeeeda25c69
*** empty log message ***
RegressionTests__IntegerTest.st
--- a/RegressionTests__IntegerTest.st	Wed May 04 11:57:13 2005 +0200
+++ b/RegressionTests__IntegerTest.st	Fri Jul 08 11:27:11 2005 +0200
@@ -1752,6 +1752,42 @@
     "Modified: / 4.6.1999 / 23:54:57 / cg"
 !
 
+testLargeIntegerHelpers
+    |t1 t2 t|
+
+    "mul2"
+
+    t1 := 16r12345678901234567890.
+    t2 := t1 deepCopy.
+    self assert:(t1 mul2 = (t2 * 2)).
+
+    t1 := 16r1234567890123456789012345678901234567890.
+    t2 := t1 deepCopy.
+    self assert:(t1 mul2 = (t2 * 2)).
+
+    t1 := 16r123456789012345678901234567890123456789012345678901234567890.
+    t2 := t1 deepCopy.
+    self assert:(t1 mul2 = (t2 * 2)).
+
+    t1 := 16r12345678901234567890123456789012345678901234567890123456789012345678901234567890.
+    t2 := t1 deepCopy.
+    self assert:(t1 mul2 = (t2 * 2)).
+
+    t1 := 10000 factorial.
+    t2 := t1 deepCopy.
+    self assert:(t1 mul2 = (t2 * 2)).
+
+"/    t1 := 1000 factorial.
+"/    t := Time millisecondsToRun:[ 100000 timesRepeat:[ t1 mul2. ] ].
+"/    Transcript showCR:t.
+
+    "
+     self basicNew testLargeIntegerHelpers
+    "
+
+    "Modified: / 20.5.1999 / 09:41:19 / cg"
+!
+
 testLargeMultiplication
     |t1|