File tree Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Expand file tree Collapse file tree 2 files changed +32
-0
lines changed Original file line number Diff line number Diff line change 2929 (preprocess
3030 (pps ppx_js_internal ppx_expect)))
3131
32+ (library
33+ ;; lib/ tests/ test_eval.ml
34+ (name test_eval_75)
35+ (enabled_if true )
36+ (modules test_eval)
37+ (libraries js_of_ocaml unix)
38+ (inline_tests (modes js wasm))
39+ (preprocess
40+ (pps ppx_js_internal ppx_expect)))
41+
3242(library
3343 ;; lib/ tests/ test_fun_call.ml
3444 (name test_fun_call_75)
Original file line number Diff line number Diff line change 1+ open Js_of_ocaml
2+
3+ let check d = if d == 1 then print_endline " PASSED" else print_endline " FAILED"
4+
5+ let % expect_test " eval_string" =
6+ check (Js.Unsafe. eval_string " {x:1}" );
7+ (try
8+ let _ = Js.Unsafe. eval_string " function f() {return 1} ()" in
9+ print_endline " FAILED"
10+ with _ -> print_endline " PASSED" );
11+ [% expect {|
12+ PASSED
13+ PASSED
14+ | }]
15+
16+ let % expect_test " js_expr" =
17+ check Js.Unsafe. (get (js_expr " {x:1}" ) " x" );
18+ check (Js.Unsafe. js_expr " function f() {return 1} ()" );
19+ [% expect {|
20+ PASSED
21+ PASSED
22+ | }]
You can’t perform that action at this time.
0 commit comments