(env
 (_
  ;; for testing
  (env-vars
   (FOO bar))))

(library
 (name jsoo_testsuite_latest)
 (modules test_io test_floats)
 (libraries unix compiler-libs.common js_of_ocaml-compiler)
 (enabled_if
  (>= %{ocaml_version} 4.14))
 (inline_tests
  (modes js wasm best))
 (preprocess
  (pps ppx_expect)))

(library
 (name jsoo_testsuite_compression)
 (modules test_marshal_compressed)
 (libraries unix compiler-libs.common js_of_ocaml-compiler)
 (enabled_if
  (>= %{ocaml_version} 5.1.1))
 (inline_tests
  (modes js wasm best))
 (preprocess
  (pps ppx_expect)))

(library
 (name jsoo_testsuite_parsing)
 (modules test_parsing calc_parser calc_lexer)
 (libraries unix compiler-libs.common js_of_ocaml-compiler)
 (enabled_if
  (>= %{ocaml_version} 5.1.1))
 (inline_tests
  (modes js wasm best))
 (preprocess
  (pps ppx_expect)))

(library
 (name jsoo_testsuite)
 (modules
  (:standard
   \
   test_io
   test_floats
   test_float16
   test_bigarray
   test_marshal_compressed
   test_parsing
   test_runtime_value
   test_custom_name
   calc_parser
   calc_lexer))
 (libraries unix compiler-libs.common js_of_ocaml-compiler)
 (foreign_stubs
  (language c)
  (names bigarray_stubs jsoo_runtime_stubs))
 (inline_tests
  (modes js wasm best))
 (preprocess
  (pps ppx_expect)))

(test
 (name test_float16)
 (build_if
  (>= %{ocaml_version} 5.2))
 (modules test_float16 test_bigarray)
 (modes js wasm native))

(test
 (name test_runtime_value)
 (modules test_runtime_value)
 (libraries js_of_ocaml)
 (js_of_ocaml
  (javascript_files custom.js))
 (wasm_of_ocaml
  (javascript_files custom.js custom.wat))
 (modes js wasm))

(library
 (name test_custom_name)
 (modules test_custom_name)
 (inline_tests
  (modes js wasm))
 (libraries js_of_ocaml)
 (preprocess
  (pps ppx_expect)))

(ocamlyacc calc_parser)

(ocamllex calc_lexer)

(ocamlyacc parser_1307)

(ocamllex lexer_1307)
