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

Revision 59, 2.9 kB (checked in by jvargas, 3 years ago)

- Adds full commutative behavior for tuple math as default for Orca
- Introduces regression for Orca tuple math.
- Minor fixes to tests/Makefile

Line 
1REBOL []
2
3; numbers with tuples
4a: 1.2.3
5b: 253
6print ["OR11: add tuple pos-integer" a + b b + a]
7print ["OR12: sub tuple pos-integer" a - b b - a]
8print ["OR13: mul tuple pos-integer" a * b b * a]
9print ["OR14: div tuple pos-integer" a / b b / a]
10print ["OR15: and tuple pos-integer" a and b b and a]
11print ["OR16: or  tuple pos-integer" a or  b b or  a]
12print ["OR17: xor tuple pos-integer" a xor b b xor a]
13
14b: -253
15print ["OR21: add tuple neg-integer" a + b b + a]
16print ["OR22: sub tuple neg-integer" a - b b - a]
17print ["OR23: mul tuple neg-integer" a * b b * a]
18print ["OR24: div tuple neg-integer" a / b b / a]
19print ["OR25: and tuple neg-integer" a and b b and a]
20print ["OR26: or  tuple neg-integer" a or  b b or  a]
21print ["OR27: xor tuple neg-integer" a xor b b xor a]
22
23b: 501.12345
24print ["OR31: add tuple pos_decimal" a + b b + a]
25print ["OR32: sub tuple pos_decimal" a - b b - a]
26print ["OR33: mul tuple pos_decimal" a * b b * a]
27print ["OR34: div tuple pos_decimal" a / b b / a]
28print ["OR35: and tuple pos_decimal" a and b b and a]
29print ["OR36: or  tuple pos_decimal" a or  b b or  a]
30print ["OR37: xor tuple pos_decimal" a xor b b xor a]
31
32b: -501.12345
33print ["OR41: add tuple neg_decimal" a + b b + a]
34print ["OR42: sub tuple neg_decimal" a - b b - a]
35print ["OR43: mul tuple neg_decimal" a * b b * a]
36print ["OR44: div tuple neg_decimal" a / b b / a]
37print ["OR45: and tuple neg_decimal" a and b b and a]
38print ["OR46: or  tuple neg_decimal" a or  b b or  a]
39print ["OR47: xor tuple neg_decimal" a xor b b xor a]
40
41; tuples with tuples
42b: 0.0.0
43print ["low bound"]
44print ["OR51: add tuple tuple" a + b b + a]
45print ["OR52: sub tuple tuple" a - b b - a]
46print ["OR53: mul tuple tuple" a * b b * a]
47print ["OR54: div tuple tuple" b / a]          ;; div by zero
48print ["OR55: and tuple tuple" a and b b and a]
49print ["OR56: or  tuple tuple" a or  b b or  a]
50print ["OR57: xor tuple tuple" a xor b b xor a]
51
52b: 255.255.255
53print ["high bound"]
54print ["OR61: add tuple tuple" a + b b + a]
55print ["OR62: sub tuple tuple" a - b b - a]
56print ["OR63: mul tuple tuple" a * b b * a]
57print ["OR64: div tuple tuple" a / b b / a]
58print ["OR65: and tuple tuple" a and b b and a]
59print ["OR66: or  tuple tuple" a or  b b or  a]
60print ["OR67: xor tuple tuple" a xor b b xor a]
61
62b: 127.127.127
63print ["between"]
64print ["OR71: add tuple tuple" a + b b + a]
65print ["OR72: sub tuple tuple" a - b b - a]
66print ["OR73: mul tuple tuple" a * b b * a]
67print ["OR74: div tuple tuple" a / b b / a]
68print ["OR75: and tuple tuple" a and b b and a]
69print ["OR76: or  tuple tuple" a or  b b or  a]
70print ["OR77: xor tuple tuple" a xor b b xor a]
71
72b: 127.127.127.127
73print ["different len"]
74print ["OR81: add tuple tuple" a + b b + a]
75print ["OR82: sub tuple tuple" a - b b - a]
76print ["OR83: mul tuple tuple" a * b b * a]
77print ["OR84: div tuple tuple" a / b]         ;; div by zero
78print ["OR85: and tuple tuple" a and b b and a]
79print ["OR86: or  tuple tuple" a or  b b or  a]
80print ["OR87: xor tuple tuple" a xor b b xor a]
81
Note: See TracBrowser for help on using the browser.