forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
and_or_tailcall_test.js
65 lines (57 loc) · 1.04 KB
/
and_or_tailcall_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
'use strict';
var Mt = require("./mt.js");
var Block = require("../../lib/js/block.js");
function f(b, _, _n) {
while(true) {
var n = _n;
if (n > 100000 || !b) {
return false;
} else {
_n = n + 1 | 0;
continue ;
}
};
}
function or_f(b, _, _n) {
while(true) {
var n = _n;
if (n > 100000) {
return false;
} else if (b) {
return true;
} else {
_n = n + 1 | 0;
continue ;
}
};
}
var suites_000 = /* tuple */[
"and_tail",
(function () {
return /* Eq */Block.__(0, [
false,
f(true, 1, 0)
]);
})
];
var suites_001 = /* :: */[
/* tuple */[
"or_tail",
(function () {
return /* Eq */Block.__(0, [
false,
or_f(false, 1, 0)
]);
})
],
/* [] */0
];
var suites = /* :: */[
suites_000,
suites_001
];
Mt.from_pair_suites("and_or_tailcall_test.ml", suites);
exports.f = f;
exports.or_f = or_f;
exports.suites = suites;
/* Not a pure module */