+ exponents are now valid: 1.212121e+18
[io/quag.git] / libs / iovm / tests / VectorCompareTest.io
blobeab2a1880e4e08919f6077d4515f6aa55fe9cbae
1 VectorCompareTest := UnitTest clone do(
2 #verbose := method(m, m println)
4 testStrings := method(
5 assertTrue("ab" == "ab")
6 assertTrue("ba" == "ba")
7 assertTrue("ab" != "ba")
8 assertTrue("ab" < "ba")
9 assertTrue("ab" <= "ba")
10 assertTrue("ba" > "ab")
11 assertTrue("ba" >= "ab")
13 assertFalse("ab" == "ba")
14 assertFalse("ba" == "ab")
15 assertFalse("ba" < "ab")
16 assertFalse("ba" <= "ab")
17 assertFalse("ab" > "ba")
18 assertFalse("ab" >= "ba")
21 testVectors := method(
22 assertTrue( vector(1,1) == vector(1,1) )
23 assertFalse( vector(1,0) == vector(0,1) )
24 assertFalse( vector(0,1) == vector(1,0) )
26 assertFalse( vector(1,1) != vector(1,1) )
27 assertTrue( vector(1,0) != vector(0,1) )
28 assertTrue( vector(0,1) != vector(1,0) )
30 assertTrue( vector(1, 3) < vector(2,2) )
31 assertFalse( vector(3, 1) < vector(2,2) )
32 assertTrue( vector(1, 3) <= vector(2,2) )
33 assertFalse( vector(3, 1) <= vector(2,2) )
35 assertTrue( vector(3, 1) > vector(2,2) )
36 assertFalse( vector(1, 3) > vector(2,2) )
37 assertTrue( vector(3, 1) >= vector(2,2) )
38 assertFalse( vector(1, 3) >= vector(2,2) )
40 assertFalse( vector(1, 3) == vector(2,2) )
41 assertFalse( vector(3, 1) == vector(2,2) )
43 assertTrue( vector(1, 1) < vector(2,2) )
44 assertTrue( vector(1, 1) <= vector(2,2) )
45 assertTrue( vector(3, 3) > vector(2,2) )
46 assertTrue( vector(3, 3) >= vector(2,2) )
47 assertTrue( vector(2, 2) == vector(2,2) )