Skip to content

Commit 9c80b22

Browse files
committed
add float operation test for pervasives module
1 parent d3cf06e commit 9c80b22

File tree

2 files changed

+110
-0
lines changed

2 files changed

+110
-0
lines changed

jscomp/test/test_pervasive.js

+90
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,98 @@ var Pervasives$1 = /* module */[
125125
/* do_at_exit */Pervasives.do_at_exit
126126
];
127127

128+
function a0(prim) {
129+
return Math.abs(prim);
130+
}
131+
132+
function a2(prim) {
133+
return Math.tan(prim);
134+
}
135+
136+
function a3(prim) {
137+
return Math.tanh(prim);
138+
}
139+
140+
function a4(prim) {
141+
return Math.asin(prim);
142+
}
143+
144+
function a5(prim, prim$1) {
145+
return Math.atan2(prim, prim$1);
146+
}
147+
148+
function a6(prim) {
149+
return Math.atan(prim);
150+
}
151+
152+
function a7(prim) {
153+
return Math.ceil(prim);
154+
}
155+
156+
function a8(prim) {
157+
return Math.cos(prim);
158+
}
159+
160+
function a9(prim) {
161+
return Math.cosh(prim);
162+
}
163+
164+
function a10(prim) {
165+
return Math.exp(prim);
166+
}
167+
168+
function a11(prim) {
169+
return Math.sin(prim);
170+
}
171+
172+
function a12(prim) {
173+
return Math.sinh(prim);
174+
}
175+
176+
function a13(prim) {
177+
return Math.sqrt(prim);
178+
}
179+
180+
function a14(prim) {
181+
return Math.floor(prim);
182+
}
183+
184+
function a15(prim) {
185+
return Math.log(prim);
186+
}
187+
188+
function a16(prim) {
189+
return Math.log10(prim);
190+
}
191+
192+
function a17(prim) {
193+
return Math.log1p(prim);
194+
}
195+
196+
function a1(prim, prim$1) {
197+
return Math.pow(prim, prim$1);
198+
}
199+
128200
var f = Pervasives.$at;
129201

130202
exports.Pervasives = Pervasives$1;
131203
exports.f = f;
204+
exports.a0 = a0;
205+
exports.a2 = a2;
206+
exports.a3 = a3;
207+
exports.a4 = a4;
208+
exports.a5 = a5;
209+
exports.a6 = a6;
210+
exports.a7 = a7;
211+
exports.a8 = a8;
212+
exports.a9 = a9;
213+
exports.a10 = a10;
214+
exports.a11 = a11;
215+
exports.a12 = a12;
216+
exports.a13 = a13;
217+
exports.a14 = a14;
218+
exports.a15 = a15;
219+
exports.a16 = a16;
220+
exports.a17 = a17;
221+
exports.a1 = a1;
132222
/* No side effect */

jscomp/test/test_pervasive.ml

+20
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,26 @@ module Pervasives = struct include List include Pervasives end
44

55
let f = Pervasives.(@)
66

7+
8+
let a0 = abs_float
9+
let a1 = acos
10+
let a2 = tan
11+
let a3 = tanh
12+
let a4 = asin
13+
let a5 = atan2
14+
let a6 = atan
15+
let a7 = ceil
16+
let a8 = cos
17+
let a9 = cosh
18+
let a10 = exp
19+
let a11 = sin
20+
let a12 = sinh
21+
let a13 = sqrt
22+
let a14 = floor
23+
let a15 = log
24+
let a16 = log10
25+
let a17 = log1p
26+
let a18 = ( ** )
727
(* local variables: *)
828
(* compile-command: "ocamlc -dlambda -c test_pervasive.ml" *)
929
(* end: *)

0 commit comments

Comments
 (0)