forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjs_bool_test.js
150 lines (129 loc) · 2.04 KB
/
js_bool_test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
'use strict';
var Mt = require("./mt.js");
var Block = require("../../lib/js/block.js");
function f(x) {
if (x) {
return true;
} else {
return false;
}
}
function f2(x) {
if (x) {
return true;
} else {
return false;
}
}
function f4(x) {
if (x) {
return true;
} else {
return false;
}
}
var u = ( 1);
var v = ( true);
var suites_000 = /* tuple */[
"caml_bool_eq_caml_bool",
(function (param) {
return /* Eq */Block.__(0, [
u,
true
]);
})
];
var suites_001 = /* :: */[
/* tuple */[
"js_bool_eq_js_bool",
(function (param) {
return /* Eq */Block.__(0, [
v,
true
]);
})
],
/* :: */[
/* tuple */[
"js_bool_neq_acml_bool",
(function (param) {
return /* Eq */Block.__(0, [
true,
true === true
]);
})
],
/* [] */0
]
];
var suites = /* :: */[
suites_000,
suites_001
];
function ff(u) {
if (u === true) {
return 1;
} else {
return 2;
}
}
function fi(x, y) {
return x === y;
}
function fb(x, y) {
return x === y;
}
function fadd(x, y) {
return x + y | 0;
}
function ffadd(x, y) {
return x + y;
}
function ss(x) {
return "xx" > x;
}
function bb(x) {
return /* tuple */[
true > x,
false,
true,
true <= x,
false,
false < x,
false >= x,
true
];
}
var consts = /* tuple */[
false,
false,
true,
false,
true,
false,
true,
true
];
var bool_array = /* array */[
true,
false
];
Mt.from_pair_suites("Js_bool_test", suites);
var f3 = true;
exports.f = f;
exports.f2 = f2;
exports.f4 = f4;
exports.f3 = f3;
exports.u = u;
exports.v = v;
exports.suites = suites;
exports.ff = ff;
exports.fi = fi;
exports.fb = fb;
exports.fadd = fadd;
exports.ffadd = ffadd;
exports.ss = ss;
exports.bb = bb;
exports.consts = consts;
exports.bool_array = bool_array;
/* u Not a pure module */