]> gitweb.factorcode.org Git - factor.git/blob - basis/compiler/tests/float.factor
Delete empty unit tests files, remove 1- and 1+, reorder IN: lines in a lot of places...
[factor.git] / basis / compiler / tests / float.factor
1 USING: compiler.units compiler kernel kernel.private memory math
2 math.private tools.test math.floats.private ;
3 IN: compiler.tests.float
4
5 [ 5.0 ] [ [ 5.0 ] compile-call gc gc gc ] unit-test
6 [ 2.0 3.0 ] [ 3.0 [ 2.0 swap ] compile-call ] unit-test
7
8 [ 1 2 3 4.0 ] [ [ 1 2 3 4.0 ] compile-call ] unit-test
9
10 [ 3.0 1 2 3 ] [ 1.0 2.0 [ float+ 1 2 3 ] compile-call ] unit-test
11
12 [ 3 ] [ 1.0 [ 2.0 float+ tag ] compile-call ] unit-test
13
14 [ 3.0 ] [ 1.0 [ 2.0 float+ ] compile-call ] unit-test
15 [ 3.0 ] [ 1.0 [ 2.0 swap float+ ] compile-call ] unit-test
16 [ 3.0 ] [ 1.0 2.0 [ float+ ] compile-call ] unit-test
17 [ 3.0 ] [ 1.0 2.0 [ swap float+ ] compile-call ] unit-test
18
19 [ -1.0 ] [ 1.0 [ 2.0 float- ] compile-call ] unit-test
20 [ 1.0 ] [ 1.0 [ 2.0 swap float- ] compile-call ] unit-test
21 [ -1.0 ] [ 1.0 2.0 [ float- ] compile-call ] unit-test
22 [ 1.0 ] [ 1.0 2.0 [ swap float- ] compile-call ] unit-test
23
24 [ 6.0 ] [ 3.0 [ 2.0 float* ] compile-call ] unit-test
25 [ 6.0 ] [ 3.0 [ 2.0 swap float* ] compile-call ] unit-test
26 [ 6.0 ] [ 3.0 2.0 [ float* ] compile-call ] unit-test
27 [ 6.0 ] [ 3.0 2.0 [ swap float* ] compile-call ] unit-test
28
29 [ 0.5 ] [ 1.0 [ 2.0 float/f ] compile-call ] unit-test
30 [ 2.0 ] [ 1.0 [ 2.0 swap float/f ] compile-call ] unit-test
31 [ 0.5 ] [ 1.0 2.0 [ float/f ] compile-call ] unit-test
32 [ 2.0 ] [ 1.0 2.0 [ swap float/f ] compile-call ] unit-test
33
34 [ t ] [ 1.0 2.0 [ float< ] compile-call ] unit-test
35 [ t ] [ 1.0 [ 2.0 float< ] compile-call ] unit-test
36 [ f ] [ 1.0 [ 2.0 swap float< ] compile-call ] unit-test
37 [ f ] [ 1.0 1.0 [ float< ] compile-call ] unit-test
38 [ f ] [ 1.0 [ 1.0 float< ] compile-call ] unit-test
39 [ f ] [ 1.0 [ 1.0 swap float< ] compile-call ] unit-test
40 [ f ] [ 3.0 1.0 [ float< ] compile-call ] unit-test
41 [ f ] [ 3.0 [ 1.0 float< ] compile-call ] unit-test
42 [ t ] [ 3.0 [ 1.0 swap float< ] compile-call ] unit-test
43
44 [ t ] [ 1.0 2.0 [ float<= ] compile-call ] unit-test
45 [ t ] [ 1.0 [ 2.0 float<= ] compile-call ] unit-test
46 [ f ] [ 1.0 [ 2.0 swap float<= ] compile-call ] unit-test
47 [ t ] [ 1.0 1.0 [ float<= ] compile-call ] unit-test
48 [ t ] [ 1.0 [ 1.0 float<= ] compile-call ] unit-test
49 [ t ] [ 1.0 [ 1.0 swap float<= ] compile-call ] unit-test
50 [ f ] [ 3.0 1.0 [ float<= ] compile-call ] unit-test
51 [ f ] [ 3.0 [ 1.0 float<= ] compile-call ] unit-test
52 [ t ] [ 3.0 [ 1.0 swap float<= ] compile-call ] unit-test
53
54 [ f ] [ 1.0 2.0 [ float> ] compile-call ] unit-test
55 [ f ] [ 1.0 [ 2.0 float> ] compile-call ] unit-test
56 [ t ] [ 1.0 [ 2.0 swap float> ] compile-call ] unit-test
57 [ f ] [ 1.0 1.0 [ float> ] compile-call ] unit-test
58 [ f ] [ 1.0 [ 1.0 float> ] compile-call ] unit-test
59 [ f ] [ 1.0 [ 1.0 swap float> ] compile-call ] unit-test
60 [ t ] [ 3.0 1.0 [ float> ] compile-call ] unit-test
61 [ t ] [ 3.0 [ 1.0 float> ] compile-call ] unit-test
62 [ f ] [ 3.0 [ 1.0 swap float> ] compile-call ] unit-test
63
64 [ f ] [ 1.0 2.0 [ float>= ] compile-call ] unit-test
65 [ f ] [ 1.0 [ 2.0 float>= ] compile-call ] unit-test
66 [ t ] [ 1.0 [ 2.0 swap float>= ] compile-call ] unit-test
67 [ t ] [ 1.0 1.0 [ float>= ] compile-call ] unit-test
68 [ t ] [ 1.0 [ 1.0 float>= ] compile-call ] unit-test
69 [ t ] [ 1.0 [ 1.0 swap float>= ] compile-call ] unit-test
70 [ t ] [ 3.0 1.0 [ float>= ] compile-call ] unit-test
71 [ t ] [ 3.0 [ 1.0 float>= ] compile-call ] unit-test
72 [ f ] [ 3.0 [ 1.0 swap float>= ] compile-call ] unit-test
73
74 [ f ] [ 1.0 2.0 [ float= ] compile-call ] unit-test
75 [ t ] [ 1.0 1.0 [ float= ] compile-call ] unit-test
76 [ f ] [ 1.0 [ 2.0 float= ] compile-call ] unit-test
77 [ t ] [ 1.0 [ 1.0 float= ] compile-call ] unit-test
78 [ f ] [ 1.0 [ 2.0 swap float= ] compile-call ] unit-test
79 [ t ] [ 1.0 [ 1.0 swap float= ] compile-call ] unit-test
80
81 [ t ] [ 0.0 [ dup 0.0 float= swap -0.0 float= or ] compile-call ] unit-test
82 [ t ] [ -0.0 [ dup 0.0 float= swap -0.0 float= or ] compile-call ] unit-test
83 [ f ] [ 3.0 [ dup 0.0 float= swap -0.0 float= or ] compile-call ] unit-test
84
85 [ 315 315.0 ] [ 313 [ 2 fixnum+fast dup fixnum>float ] compile-call ] unit-test