Skip to content

Commit dd457be

Browse files
vouillonhhugo
authored andcommitted
Parsing test: remove no longer necessary flush
1 parent f7ad262 commit dd457be

File tree

4 files changed

+21
-26
lines changed

4 files changed

+21
-26
lines changed

compiler/tests-jsoo/dune

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,32 @@
2020
(preprocess
2121
(pps ppx_expect)))
2222

23+
(library
24+
(name jsoo_testsuite_parsing)
25+
(modules test_parsing calc_parser calc_lexer)
26+
(libraries unix compiler-libs.common js_of_ocaml-compiler)
27+
(enabled_if
28+
(>= %{ocaml_version} 5.1.1))
29+
(inline_tests
30+
(modes js best))
31+
(preprocess
32+
(pps ppx_expect)))
33+
2334
(library
2435
(name jsoo_testsuite)
2536
(modules
26-
(:standard \ test_io test_floats test_marshal_compressed))
37+
(:standard
38+
\
39+
test_io
40+
test_floats
41+
test_marshal_compressed
42+
test_parsing
43+
calc_parser
44+
calc_lexer))
2745
(libraries unix compiler-libs.common js_of_ocaml-compiler)
2846
(foreign_stubs
2947
(language c)
30-
(names bigarray_stubs flush_stubs))
31-
(js_of_ocaml
32-
(javascript_files runtime.js))
48+
(names bigarray_stubs))
3349
(inline_tests
3450
(modes js best))
3551
(preprocess

compiler/tests-jsoo/flush_stubs.c

Lines changed: 0 additions & 12 deletions
This file was deleted.

compiler/tests-jsoo/runtime.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

compiler/tests-jsoo/test_parsing.ml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,22 +17,15 @@
1717
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
1818
*)
1919

20-
(* see https://github.com/ocaml/ocaml/pull/12046 *)
21-
external flush_stdout_stderr : unit -> unit = "flush_stdout_stderr"
22-
2320
let parse s =
24-
flush_stdout_stderr ();
2521
try
2622
let lexbuf = Lexing.from_string s in
2723
while true do
2824
let result = Calc_parser.main Calc_lexer.token lexbuf in
29-
flush_stdout_stderr ();
3025
print_int result;
3126
print_newline ()
3227
done
33-
with Calc_lexer.Eof ->
34-
flush_stdout_stderr ();
35-
print_endline "EOF"
28+
with Calc_lexer.Eof -> print_endline "EOF"
3629

3730
let%expect_test "parsing" =
3831
let (old : bool) = Parsing.set_trace true in

0 commit comments

Comments
 (0)