1 | test_test = ->
|
2 | run_test [
|
3 | "a<a+1",
|
4 | "1",
|
5 |
|
6 | "a-1<a",
|
7 | "1",
|
8 |
|
9 | "0==-0",
|
10 | "1",
|
11 |
|
12 | "0!=-0",
|
13 | "0",
|
14 |
|
15 | "1==1",
|
16 | "1",
|
17 |
|
18 | "1==2",
|
19 | "0",
|
20 |
|
21 | "1!=1",
|
22 | "0",
|
23 |
|
24 | "1!=2",
|
25 | "1",
|
26 |
|
27 | "1>=1",
|
28 | "1",
|
29 |
|
30 | "1>=2",
|
31 | "0",
|
32 |
|
33 | "2>=1",
|
34 | "1",
|
35 |
|
36 | "1>1",
|
37 | "0",
|
38 |
|
39 | "1>2",
|
40 | "0",
|
41 |
|
42 | "2>1",
|
43 | "1",
|
44 |
|
45 | "1<=1",
|
46 | "1",
|
47 |
|
48 | "1<=2",
|
49 | "1",
|
50 |
|
51 | "2<=1",
|
52 | "0",
|
53 |
|
54 | "1<1",
|
55 | "0",
|
56 |
|
57 | "1<2",
|
58 | "1",
|
59 |
|
60 | "2<1",
|
61 | "0",
|
62 |
|
63 | "-1<-2",
|
64 | "0",
|
65 |
|
66 | "-2<-1",
|
67 | "1",
|
68 |
|
69 | "test(0,A,B)",
|
70 | "B",
|
71 |
|
72 | "test(1,A,B)",
|
73 | "A",
|
74 |
|
75 | "test(0,A,0,B)",
|
76 | "0",
|
77 |
|
78 | "test(0,A,0,B,C)",
|
79 | "C",
|
80 |
|
81 | "test(x<3,-x-4,3<=x,x*x+7,120/x+5)",
|
82 | "test(testlt(x,3),-x-4,testle(3,x),x^2+7,120/x+5)",
|
83 |
|
84 | "x = -1",
|
85 | "",
|
86 |
|
87 | "test(x<1,-x-4,3<=x,x*x+7,120/x+5)",
|
88 | "-3",
|
89 |
|
90 | "x = 3",
|
91 | "",
|
92 |
|
93 | "test(x<1,-x-4,3<=x,x*x+7,120/x+5)",
|
94 | "16",
|
95 |
|
96 | "x = 2",
|
97 | "",
|
98 |
|
99 | "test(x<1,-x-4,3<=x,x*x+7,120/x+5)",
|
100 | "65",
|
101 |
|
102 | "x=quote(x)",
|
103 | "",
|
104 |
|
105 | "not(1)",
|
106 | "0",
|
107 |
|
108 | "not(0)",
|
109 | "1",
|
110 |
|
111 | "not(a=a)",
|
112 | "0",
|
113 |
|
114 | "and(1,1)",
|
115 | "1",
|
116 |
|
117 | "and(1,0)",
|
118 | "0",
|
119 |
|
120 | "and(a=a,b=b)",
|
121 | "1",
|
122 |
|
123 | "or(1,0)",
|
124 | "1",
|
125 |
|
126 | "or(0,0)",
|
127 | "0",
|
128 |
|
129 | "[0,0]==0",
|
130 | "1",
|
131 |
|
132 | "1<sqrt(3)",
|
133 | "1",
|
134 |
|
135 | "cos(x)^2 + sin(x)^2 == 1",
|
136 | "1",
|
137 |
|
138 | "cos(x)^2 + sin(x)^2 >= 1",
|
139 | "1",
|
140 |
|
141 | "cos(x)^2 + sin(x)^2 <= 1",
|
142 | "1",
|
143 |
|
144 | "cos(x)^2 + sin(x)^2 < 1",
|
145 | "0",
|
146 |
|
147 | "cos(x)^2 + sin(x)^2 + 1 > 1",
|
148 | "1",
|
149 |
|
150 | "x + x > x",
|
151 | "testgt(2*x,x)",
|
152 |
|
153 | "a > x",
|
154 | "testgt(a,x)",
|
155 |
|
156 | "a >= x",
|
157 | "testge(a,x)",
|
158 |
|
159 | "a == x",
|
160 | "testeq(a,x)",
|
161 |
|
162 | "a < x",
|
163 | "testlt(a,x)",
|
164 |
|
165 | "a <= x",
|
166 | "testle(a,x)",
|
167 |
|
168 |
|
169 |
|
170 | "a=quote(a)",
|
171 | "",
|
172 |
|
173 | "x=quote(x)",
|
174 | "",
|
175 |
|
176 | "b=quote(b)",
|
177 | "",
|
178 |
|
179 | "A=quote(A)",
|
180 | "",
|
181 |
|
182 | "B=quote(B)",
|
183 | "",
|
184 |
|
185 | "C=quote(C)",
|
186 | "",
|
187 |
|
188 | ]
|
189 |
|