equal
deleted
inserted
replaced
126 (self testPlus1_b:SmallInteger maxVal) == 1073741824 |
126 (self testPlus1_b:SmallInteger maxVal) == 1073741824 |
127 " |
127 " |
128 ! ! |
128 ! ! |
129 |
129 |
130 !IntegerTest class methodsFor:'private'! |
130 !IntegerTest class methodsFor:'private'! |
|
131 |
|
132 absPlusOneOf:arg |
|
133 |local1| |
|
134 |
|
135 local1 := arg. |
|
136 ^ local1 abs + 1 |
|
137 |
|
138 |
|
139 " |
|
140 self absPlusOneOf:-1 |
|
141 self absPlusOneOf:-1.0 |
|
142 " |
|
143 |
|
144 "Created: / 31.10.2000 / 20:21:52 / cg" |
|
145 ! |
131 |
146 |
132 alwaysTrue |
147 alwaysTrue |
133 ^ true.! |
148 ^ true.! |
134 |
149 |
135 doConstantIntegerShift |
150 doConstantIntegerShift |
502 self testLargeMultiplication. |
517 self testLargeMultiplication. |
503 self testLargeDivision. |
518 self testLargeDivision. |
504 self testIntegerShifts. |
519 self testIntegerShifts. |
505 self testEncodeDecode. |
520 self testEncodeDecode. |
506 self testIntegerMisc. |
521 self testIntegerMisc. |
|
522 self testInline1. |
507 |
523 |
508 " |
524 " |
509 self testAll |
525 self testAll |
510 " |
526 " |
511 |
527 |
512 "Modified: / 6.6.1999 / 14:46:11 / cg" |
528 "Modified: / 31.10.2000 / 20:23:20 / cg" |
513 ! |
529 ! |
514 |
530 |
515 testEncodeDecode |
531 testEncodeDecode |
516 self test:[1 encodeAsBCD hexPrintString = '1']. |
532 self test:[1 encodeAsBCD hexPrintString = '1']. |
517 self test:[12 encodeAsBCD hexPrintString = '12']. |
533 self test:[12 encodeAsBCD hexPrintString = '12']. |
590 self testILC |
606 self testILC |
591 " |
607 " |
592 |
608 |
593 "Created: / 6.6.1999 / 14:47:51 / cg" |
609 "Created: / 6.6.1999 / 14:47:51 / cg" |
594 "Modified: / 9.6.1999 / 17:49:57 / cg" |
610 "Modified: / 9.6.1999 / 17:49:57 / cg" |
|
611 ! |
|
612 |
|
613 testInline1 |
|
614 "inlined tests. |
|
615 Notice, the arithmetic tests are both performed via regular sends |
|
616 and via constructed performs. The reason is to test both inlined |
|
617 JIT-compiler code AND the regular methods code." |
|
618 |
|
619 self test: [ (self absPlusOneOf:1) = 2 ]. |
|
620 self test: [ (self absPlusOneOf:-1) = 2 ]. |
|
621 self test: [ (self absPlusOneOf:1.0) = 2 ]. |
|
622 self test: [ (self absPlusOneOf:-1.0) = 2 ]. |
|
623 |
|
624 " |
|
625 self testInline1 |
|
626 " |
|
627 |
|
628 "Created: / 31.10.2000 / 20:22:48 / cg" |
|
629 "Modified: / 31.10.2000 / 20:23:06 / cg" |
595 ! |
630 ! |
596 |
631 |
597 testInteger1 |
632 testInteger1 |
598 "general conversion & arithmetic tests. |
633 "general conversion & arithmetic tests. |
599 Notice, the arithmetic tests are both performed via regular sends |
634 Notice, the arithmetic tests are both performed via regular sends |