equal
deleted
inserted
replaced
8 poolDictionaries:'' |
8 poolDictionaries:'' |
9 category:'tests-Regression' |
9 category:'tests-Regression' |
10 ! |
10 ! |
11 |
11 |
12 |
12 |
|
13 !SmallIntegerTest class methodsFor:'others'! |
|
14 |
|
15 version_CVS |
|
16 ^ '$Header$' |
|
17 ! ! |
|
18 |
13 !SmallIntegerTest methodsFor:'tests-arithmetic'! |
19 !SmallIntegerTest methodsFor:'tests-arithmetic'! |
14 |
20 |
15 testDivide |
21 testDivide |
|
22 |zero| |
|
23 |
|
24 "circumvent compiler error about division by zero" |
|
25 zero := 0. |
|
26 |
16 self assert: 2 / 1 = 2. |
27 self assert: 2 / 1 = 2. |
17 self assert: (3 / 2) isFraction. |
28 self assert: (3 / 2) isFraction. |
18 self assert: 4 / 2 = 2. |
29 self assert: 4 / 2 = 2. |
19 self should: [ 1 / 0 ] raise: ZeroDivide. |
30 self should: [ 1 / zero ] raise: ZeroDivide. |
20 ! |
31 ! |
21 |
32 |
22 testMultiply |
33 testMultiply |
23 |i ii| |
34 |i ii| |
24 |
35 |