Skip to content

Commit 9f7aed0

Browse files
author
Hongbo Zhang
committed
add more tests
1 parent 4ac1387 commit 9f7aed0

File tree

4 files changed

+27
-7
lines changed

4 files changed

+27
-7
lines changed

jscomp/lam_compile_group.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ let lambda_as_module
422422
(lam : Lambda.lambda) =
423423
begin
424424
Js_config.set_current_file filename ;
425-
Js_config.iset_debug_file "jsoo_485_test.ml";
425+
Js_config.iset_debug_file "jsoo_400_test.ml";
426426
let lambda_output = compile ~filename output_prefix false env sigs lam in
427427
let (//) = Filename.concat in
428428
let basename =

jscomp/test/.depend

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,8 +334,8 @@ js_obj_test.cmj : mt.cmi
334334
js_obj_test.cmx : mt.cmx
335335
js_val.cmj :
336336
js_val.cmx :
337-
jsoo_400_test.cmj : ../stdlib/string.cmi
338-
jsoo_400_test.cmx : ../stdlib/string.cmx
337+
jsoo_400_test.cmj : ../stdlib/string.cmi mt.cmi
338+
jsoo_400_test.cmx : ../stdlib/string.cmx mt.cmx
339339
jsoo_485.cmj :
340340
jsoo_485.cmx :
341341
jsoo_485_test.cmj :
@@ -1092,8 +1092,8 @@ js_obj_test.cmo : mt.cmi
10921092
js_obj_test.cmj : mt.cmj
10931093
js_val.cmo :
10941094
js_val.cmj :
1095-
jsoo_400_test.cmo : ../stdlib/string.cmi
1096-
jsoo_400_test.cmj : ../stdlib/string.cmj
1095+
jsoo_400_test.cmo : ../stdlib/string.cmi mt.cmi
1096+
jsoo_400_test.cmj : ../stdlib/string.cmj mt.cmj
10971097
jsoo_485.cmo :
10981098
jsoo_485.cmj :
10991099
jsoo_485_test.cmo :

jscomp/test/jsoo_400_test.js

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
'use strict';
22

3+
var Mt = require("./mt");
34
var Caml_int32 = require("../../lib/js/caml_int32");
5+
var Block = require("../../lib/js/block");
46

57
function u() {
68
var exit = 0;
@@ -18,5 +20,18 @@ function u() {
1820

1921
}
2022

23+
Mt.from_pair_suites("jsoo_400_test.ml", /* :: */[
24+
/* tuple */[
25+
'File "jsoo_400_test.ml", line 8, characters 3-10',
26+
function () {
27+
return /* ThrowAny */Block.__(3, [function () {
28+
u(/* () */0);
29+
return /* () */0;
30+
}]);
31+
}
32+
],
33+
/* [] */0
34+
]);
35+
2136
exports.u = u;
22-
/* No side effect */
37+
/* Not a pure module */

jscomp/test/jsoo_400_test.ml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
let u () =
22
match String.length "123" with
33
| n -> 3 / 0
4-
| exception _ -> 42
4+
| exception _ -> 42 (* TODO: could be optimized *)
5+
6+
;; Mt.from_pair_suites __FILE__
7+
[
8+
__LOC__, fun _ -> ThrowAny (fun _ -> ignore (u ()))
9+
]

0 commit comments

Comments
 (0)