-
Notifications
You must be signed in to change notification settings - Fork 464
/
Copy pathrandom_test.js
85 lines (67 loc) · 1.71 KB
/
random_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
// Generated by ReScript, PLEASE EDIT WITH CARE
'use strict';
var Mt = require("./mt.js");
var Int64 = require("../../lib/js/int64.js");
var Random = require("../../lib/js/random.js");
var Mt_global = require("./mt_global.js");
var Caml_array = require("../../lib/js/caml_array.js");
var id = {
contents: 0
};
var suites = {
contents: /* [] */0
};
function eq(f) {
return function (param, param$1) {
return Mt_global.collect_eq(id, suites, f, param, param$1);
};
}
function neq(f) {
return function (param, param$1) {
return Mt_global.collect_neq(id, suites, f, param, param$1);
};
}
function approx(f) {
return function (param, param$1) {
return Mt_global.collect_approx(id, suites, f, param, param$1);
};
}
Mt_global.collect_neq(id, suites, "File \"random_test.res\", line 9, characters 2-9", (Random.self_init(undefined), Random.$$int(10000)), (Random.self_init(undefined), Random.$$int(1000)));
Random.init(0);
var v = Caml_array.make(10, false);
for(var i = 0; i <= 9; ++i){
Caml_array.set(v, i, Random.bool(undefined));
}
Mt_global.collect_eq(id, suites, "File \"random_test.res\", line 28, characters 12-19", v, [
true,
true,
true,
true,
true,
false,
true,
true,
true,
false
]);
var f = Random.int64(Int64.max_int);
var h = Random.int64([
0,
3
]);
var vv = Random.bits(undefined);
var xx = Random.$$float(3.0);
var xxx = Random.int32(103);
Mt.from_pair_suites("Random_test", suites.contents);
exports.id = id;
exports.suites = suites;
exports.eq = eq;
exports.neq = neq;
exports.approx = approx;
exports.v = v;
exports.f = f;
exports.h = h;
exports.vv = vv;
exports.xx = xx;
exports.xxx = xxx;
/* Not a pure module */