RegressionTests__IntegerTest.st
changeset 1527 6865b3c44b02
parent 1526 710dda804e46
child 1528 10ec88fdd61b
--- a/RegressionTests__IntegerTest.st	Fri Sep 02 10:57:25 2016 +0200
+++ b/RegressionTests__IntegerTest.st	Fri Sep 02 11:31:58 2016 +0200
@@ -14,6 +14,10 @@
 
 !IntegerTest methodsFor:'misc'!
 
+do:a plus:b
+    ^  a + b
+!
+
 doAdd2_a:arg
     ^ arg + 2
 
@@ -4079,20 +4083,25 @@
     "/ max-smallint+1 on 64bit machines
     self assert:((Integer readFrom:'4611686018427387900') printString = '4611686018427387900').
     SmallInteger maxBytes == 8 ifTrue:[
-        |t t3 t4a t4b|
+        |t t3 t3b t4a t4b t4c|
 
         self assert:((Integer readFrom:'4611686018427387900') class == SmallInteger).
         t := (Integer readFrom:'4611686018427387900').
         t3 := t + 3.
         self assert:(t3 class == SmallInteger).
         self assert:(t3 printString = '4611686018427387903').
+        t3b := (self do:t plus:3).
+        self assert:(t3b class == SmallInteger).
+        self assert:(t3b printString = '4611686018427387903').
         t4a := t3 + 1.
         self assert:(t4a class == LargeInteger).
         self assert:(t4a printString = '4611686018427387904').
         t4b := t + 4.
         self assert:(t4b class == LargeInteger).
         self assert:(t4b printString = '4611686018427387904').
-        self halt.
+        t4c := (self do:t plus:4).
+        self assert:(t4c class == LargeInteger).
+        self assert:(t4c printString = '4611686018427387904').
     ].
     self assert:((Integer readFrom:'4611686018427387904') printString = '4611686018427387904').
     self assert:((Integer readFrom:'4611686018427387904') class == LargeInteger).