Skip to content

Commit 7c7f281

Browse files
author
Hongbo Zhang
committed
add no assert test case
1 parent 16f2327 commit 7c7f281

File tree

4 files changed

+38
-1
lines changed

4 files changed

+38
-1
lines changed

jscomp/test/.depend

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,8 @@ nested_obj_literal.cmj :
340340
nested_obj_literal.cmx :
341341
nested_obj_test.cmj :
342342
nested_obj_test.cmx :
343+
noassert.cmj :
344+
noassert.cmx :
343345
number_lexer.cmj : ../stdlib/sys.cmi ../stdlib/lexing.cmi
344346
number_lexer.cmx : ../stdlib/sys.cmx ../stdlib/lexing.cmx
345347
obj_literal_ppx.cmj : ../stdlib/array.cmi
@@ -1000,6 +1002,8 @@ nested_obj_literal.cmo :
10001002
nested_obj_literal.cmj :
10011003
nested_obj_test.cmo :
10021004
nested_obj_test.cmj :
1005+
noassert.cmo :
1006+
noassert.cmj :
10031007
number_lexer.cmo : ../stdlib/sys.cmi ../stdlib/lexing.cmi
10041008
number_lexer.cmj : ../stdlib/sys.cmj ../stdlib/lexing.cmj
10051009
obj_literal_ppx.cmo : ../stdlib/array.cmi

jscomp/test/noassert.ml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
3+
4+
5+
let f () = assert false
6+
7+
8+
let h ()= assert (3 > 2)

jscomp/test/test.mllib

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,4 +325,6 @@ format_test
325325

326326
config1_test
327327
config2_test
328-
largest_int_flow
328+
largest_int_flow
329+
330+
noassert

lib/js/test/noassert.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// GENERATED CODE BY BUCKLESCRIPT VERSION 0.5.5 , PLEASE EDIT WITH CARE
2+
'use strict';
3+
4+
var Caml_builtin_exceptions = require("../caml_builtin_exceptions");
5+
6+
function f() {
7+
throw [
8+
Caml_builtin_exceptions.assert_failure,
9+
[
10+
"noassert.ml",
11+
5,
12+
11
13+
]
14+
];
15+
}
16+
17+
function h() {
18+
return 0;
19+
}
20+
21+
exports.f = f;
22+
exports.h = h;
23+
/* No side effect */

0 commit comments

Comments
 (0)