Commit ef5b1e56 authored by Pietro Abate's avatar Pietro Abate

fix test for ocaml interface

parent 24163e5b
......@@ -550,8 +550,8 @@ let check_value ty_env c_env (s,caml_t,t) =
Inferred type:@[%a@]@."
s
print_ocaml caml_t
Types.Print.print et
Types.Print.print vt;
Types.Print.pp_type et
Types.Print.pp_type vt;
exit 1
);
......
......@@ -52,11 +52,11 @@ let tests = "Misc" >:::
);
"pp" >:: ( fun test_ctxt ->
assert_equal ~msg:"Test Misc.pp.1 failed" "(`C,3,Mono)" (Misc.pp (Misc.C(3)));
assert_equal ~printer:(fun x -> x) ~msg:"Test Misc.pp.1 failed" "(C,3,Mono)" (Misc.pp (Misc.C(3)));
assert_equal ~msg:"Test Misc.pp.2 failed"
"(`A,(`C,3,Mono),Mono)" (Misc.pp (Misc.A(Misc.C(3))));
"(A,(C,3,Mono),Mono)" (Misc.pp (Misc.A(Misc.C(3))));
assert_equal ~msg:"Test Misc.pp.3 failed"
"(`B,((`C,3,Mono),(`A,(`C,2,Mono),Mono),Mono),Mono)" (Misc.pp (Misc.B(Misc.C(3),Misc.A(Misc.C(2)))));
"(B,((C,3,Mono),(A,(C,2,Mono),Mono),Mono),Mono)" (Misc.pp (Misc.B(Misc.C(3),Misc.A(Misc.C(2)))));
);
"find" >:: ( fun test_ctxt ->
......
......@@ -164,21 +164,21 @@ if test $WITHOCAML = "true"; then
$ROOT/../cduce -I $OCAMLDIR/misc --compile $OCAMLDIR/misc/misc.cd
$ROOT/../cduce -I $OCAMLDIR/misc --mlstub $OCAMLDIR/misc/consts.cdo > $OCAMLDIR/misc/consts.ml
$ROOT/../cduce -I $OCAMLDIR/misc --mlstub $OCAMLDIR/misc/misc.cdo > $OCAMLDIR/misc/misc.ml
ocamlfind ocamlc -I $OCAMLDIR/misc -g -package cduce,oUnit -linkpkg -o $OCAMLDIR/misc/misc $OCAMLDIR/misc/consts.ml $OCAMLDIR/misc/misc.ml $OCAMLDIR/misc/misctest.ml
ocamlfind ocamlc -I $OCAMLDIR/misc -g -package expat,pxp,curl,camlp4.lib,oUnit,num,netstring,pcre,ulex,oUnit -linkpkg -I lib lib/cduce_lib.cma -o $OCAMLDIR/misc/misc $OCAMLDIR/misc/consts.ml $OCAMLDIR/misc/misc.ml $OCAMLDIR/misc/misctest.ml
$OCAMLDIR/misc/misc 2> /dev/null
test $? -ne 0 && RET=1
ocamlc -I $OCAMLDIR/eval -c $OCAMLDIR/eval/eval.mli
$ROOT/../cduce -I $OCAMLDIR/eval --compile $OCAMLDIR/eval/eval.cd -I $OCAML_TOPLEVEL_PATH/../cduce
$ROOT/../cduce -I $OCAMLDIR/eval --compile $OCAMLDIR/eval/eval.cd -I $ROOT/../lib
$ROOT/../cduce -I $OCAMLDIR/eval --mlstub $OCAMLDIR/eval/eval.cdo > $OCAMLDIR/eval/eval.ml
ocamlfind ocamlc -I $OCAMLDIR/eval -package cduce,oUnit -linkpkg -o $OCAMLDIR/eval/eval $OCAMLDIR/eval/eval.ml $OCAMLDIR/eval/evaltest.ml
ocamlfind ocamlc -I $OCAMLDIR/eval -package expat,pxp,curl,camlp4.lib,oUnit,num,netstring,pcre,ulex,oUnit -linkpkg -I lib lib/cduce_lib.cma -o $OCAMLDIR/eval/eval $OCAMLDIR/eval/eval.ml $OCAMLDIR/eval/evaltest.ml
$OCAMLDIR/eval/eval
test $? -ne 0 && RET=1
ocamlc -I $OCAMLDIR/cdnum -c $OCAMLDIR/cdnum/cdnum.mli
$ROOT/../cduce -I $OCAMLDIR/cdnum --compile $OCAMLDIR/cdnum/cdnum.cd -I `ocamlfind query num`
$ROOT/../cduce -I $OCAMLDIR/cdnum --mlstub $OCAMLDIR/cdnum/cdnum.cdo > $OCAMLDIR/cdnum/cdnum.ml
ocamlfind ocamlc -I $OCAMLDIR/cdnum -package cduce,num,oUnit -linkpkg -o $OCAMLDIR/cdnum/cdnum $OCAMLDIR/cdnum/cdnum.ml $OCAMLDIR/cdnum/cdnumtest.ml
ocamlfind ocamlc -I $OCAMLDIR/cdnum -package expat,pxp,curl,camlp4.lib,oUnit,num,netstring,pcre,ulex,num,oUnit -linkpkg -I lib lib/cduce_lib.cma -o $OCAMLDIR/cdnum/cdnum $OCAMLDIR/cdnum/cdnum.ml $OCAMLDIR/cdnum/cdnumtest.ml
$OCAMLDIR/cdnum/cdnum
test $? -ne 0 && RET=1
......@@ -186,14 +186,14 @@ if test $WITHOCAML = "true"; then
ocamlc -I $OCAMLDIR/cdsdl -c -I `ocamlfind query sdl` $OCAMLDIR/cdsdl/cdsdl.mli
$ROOT/../cduce -I $OCAMLDIR/cdsdl --compile -I `ocamlfind query sdl` $OCAMLDIR/cdsdl/cdsdl.cd
$ROOT/../cduce -I $OCAMLDIR/cdsdl --mlstub -I `ocamlfind query sdl` $OCAMLDIR/cdsdl/cdsdl.cdo > $OCAMLDIR/cdsdl/cdsdl.ml
ocamlfind ocamlc -I $OCAMLDIR/cdsdl -package cduce,sdl,oUnit -linkpkg -o $OCAMLDIR/cdsdl/cdsdl $OCAMLDIR/cdsdl/cdsdl.ml $OCAMLDIR/cdsdl/cdsdltest.ml
ocamlfind ocamlc -I $OCAMLDIR/cdsdl -package expat,pxp,curl,camlp4.lib,oUnit,num,netstring,pcre,ulex,sdl,oUnit -linkpkg -I lib lib/cduce_lib.cma -o $OCAMLDIR/cdsdl/cdsdl $OCAMLDIR/cdsdl/cdsdl.ml $OCAMLDIR/cdsdl/cdsdltest.ml
$OCAMLDIR/cdsdl/cdsdl
test $? -ne 0 && RET=1
ocamlc -I $OCAMLDIR/latypes -c $OCAMLDIR/latypes/latypes.mli
$ROOT/../cduce -I $OCAMLDIR/latypes --compile $OCAMLDIR/latypes/latypes.cd
$ROOT/../cduce -I $OCAMLDIR/latypes --mlstub $OCAMLDIR/latypes/latypes.cdo > $OCAMLDIR/latypes/latypes2.ml
ocamlfind ocamlc -I $OCAMLDIR/latypes -package cduce,num,oUnit -linkpkg -o $OCAMLDIR/latypes/latypes $OCAMLDIR/latypes/latypes.ml $OCAMLDIR/latypes/latypes2.ml $OCAMLDIR/latypes/latypestest.ml
ocamlfind ocamlc -I $OCAMLDIR/latypes -package expat,pxp,curl,camlp4.lib,oUnit,num,netstring,pcre,ulex,num,oUnit -linkpkg -I lib lib/cduce_lib.cma -o $OCAMLDIR/latypes/latypes $OCAMLDIR/latypes/latypes.ml $OCAMLDIR/latypes/latypes2.ml $OCAMLDIR/latypes/latypestest.ml
$OCAMLDIR/latypes/latypes
test $? -ne 0 && RET=1
fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment