forked from rescript-lang/rescript
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprintf_test.js
110 lines (102 loc) · 3.27 KB
/
printf_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
'use strict';
var Mt = require("./mt.js");
var Block = require("../../lib/js/block.js");
var Curry = require("../../lib/js/curry.js");
var Format = require("../../lib/js/format.js");
var Printf = require("../../lib/js/printf.js");
function print_pair(fmt, param) {
return Curry._2(Format.fprintf(fmt, /* Format */[
/* Char_literal */Block.__(12, [
/* "(" */40,
/* Int */Block.__(4, [
/* Int_d */0,
/* No_padding */0,
/* No_precision */0,
/* Char_literal */Block.__(12, [
/* "," */44,
/* Int */Block.__(4, [
/* Int_d */0,
/* No_padding */0,
/* No_precision */0,
/* Char_literal */Block.__(12, [
/* ")" */41,
/* End_of_format */0
])
])
])
])
]),
"(%d,%d)"
]), param[0], param[1]);
}
var suites_000 = /* tuple */[
"sprintf_simple",
(function (param) {
return /* Eq */Block.__(0, [
"3232",
Curry._2(Printf.sprintf(/* Format */[
/* String */Block.__(2, [
/* No_padding */0,
/* Int */Block.__(4, [
/* Int_d */0,
/* No_padding */0,
/* No_precision */0,
/* End_of_format */0
])
]),
"%s%d"
]), "32", 32)
]);
})
];
var suites_001 = /* :: */[
/* tuple */[
"print_asprintf",
(function (param) {
return /* Eq */Block.__(0, [
"xx",
Format.asprintf(/* Format */[
/* String_literal */Block.__(11, [
"xx",
/* End_of_format */0
]),
"xx"
])
]);
})
],
/* :: */[
/* tuple */[
"print_pair",
(function (param) {
return /* Eq */Block.__(0, [
"(1,2)",
Curry._2(Format.asprintf(/* Format */[
/* Alpha */Block.__(15, [/* End_of_format */0]),
"%a"
]), print_pair, /* tuple */[
1,
2
])
]);
})
],
/* [] */0
]
];
var suites = /* :: */[
suites_000,
suites_001
];
var v = Format.asprintf(/* Format */[
/* String_literal */Block.__(11, [
"xx",
/* End_of_format */0
]),
"xx"
]);
Mt.from_pair_suites("Printf_test", suites);
exports.print_pair = print_pair;
exports.suites = suites;
exports.v = v;
/* v Not a pure module */