root/trunk/orca/tests/working/op_math_tuples.r

Revision 58, 2.8 kB (checked in by jvargas, 3 years ago)

- Regression op_math_tuples PASS when in using Rebol compatible mode

Line 
1REBOL []
2
3; numbers with tuples
4a: 1.2.3
5b: 253
6print ["RT11: add tuple pos-integer" a + b b + a]
7print ["RT12: sub tuple pos-integer" a - b]
8print ["RT13: mul tuple pos-integer" a * b b * a]
9print ["RT14: div tuple pos-integer" a / b]
10print ["RT15: and tuple pos-integer" a and b]
11print ["RT16: or  tuple pos-integer" a or  b]
12print ["RT17: xor tuple pos-integer" a xor b]
13
14b: -253
15print ["RT21: add tuple neg-integer" a + b b + a]
16print ["RT22: sub tuple neg-integer" a - b]
17print ["RT23: mul tuple neg-integer" a * b b * a]
18print ["RT24: div tuple neg-integer" a / b]
19print ["RT25: and tuple neg-integer" a and b]
20print ["RT26: or  tuple neg-integer" a or  b]
21print ["RT27: xor tuple neg-integer" a xor b]
22
23b: 501.12345
24print ["RT31: add tuple pos_decimal" a + b]
25print ["RT32: sub tuple pos_decimal" a - b]
26print ["RT33: mul tuple pos_decimal" a * b]
27print ["RT34: div tuple pos_decimal" a / b]
28print ["RT35: and tuple pos_decimal" a and b]
29print ["RT36: or  tuple pos_decimal" a or  b]
30print ["RT37: xor tuple pos_decimal" a xor b]
31
32b: -501.12345
33print ["RT41: add tuple neg_decimal" a + b]
34print ["RT42: sub tuple neg_decimal" a - b]
35print ["RT43: mul tuple neg_decimal" a * b]
36print ["RT44: div tuple neg_decimal" a / b]
37print ["RT45: and tuple neg_decimal" a and b]
38print ["RT46: or  tuple neg_decimal" a or  b]
39print ["RT47: xor tuple neg_decimal" a xor b]
40
41; tuples with tuples
42b: 0.0.0
43print ["low bound"]
44print ["RT51: add tuple tuple" a + b b + a]
45print ["RT52: sub tuple tuple" a - b b - a]
46print ["RT53: mul tuple tuple" a * b b * a]
47print ["RT54: div tuple tuple" b / a]                 ;; div by zero
48print ["RT55: and tuple tuple" a and b b and a]
49print ["RT56: or  tuple tuple" a or  b b or  a]
50print ["RT57: xor tuple tuple" a xor b b xor a]
51
52b: 255.255.255
53print ["high bound"]
54print ["RT61: add tuple tuple" a + b b + a]
55print ["RT62: sub tuple tuple" a - b b - a]
56print ["RT63: mul tuple tuple" a * b b * a]
57print ["RT64: div tuple tuple" a / b b / a]
58print ["RT65: and tuple tuple" a and b b and a]
59print ["RT66: or  tuple tuple" a or  b b or  a]
60print ["RT67: xor tuple tuple" a xor b b xor a]
61
62b: 127.127.127
63print ["between"]
64print ["RT71: add tuple tuple" a + b b + a]
65print ["RT72: sub tuple tuple" a - b b - a]
66print ["RT73: mul tuple tuple" a * b b * a]
67print ["RT74: div tuple tuple" a / b b / a]
68print ["RT75: and tuple tuple" a and b b and a]
69print ["RT76: or  tuple tuple" a or  b b or  a]
70print ["RT77: xor tuple tuple" a xor b b xor a]
71
72b: 127.127.127.127
73print ["different len"]
74print ["RT81: add tuple tuple" a + b b + a]
75print ["RT82: sub tuple tuple" a - b b - a]
76print ["RT83: mul tuple tuple" a * b b * a]
77print ["RT84: div tuple tuple" a / b]                 ;; div by zero
78print ["RT85: and tuple tuple" a and b b and a]
79print ["RT86: or  tuple tuple" a or  b b or  a]
80print ["RT87: xor tuple tuple" a xor b b xor a]
81
Note: See TracBrowser for help on using the browser.