Commit a348bcd9 authored by Pietro Abate's avatar Pietro Abate

minor fix to lambda tests

parent ef5b1e56
......@@ -14,29 +14,26 @@ let run_test_compile msg expected totest _ =
;;
let tests_poly_abstr = [
"Test CDuce.lambda.const_abstr failed",
"fun f (_ : Int) : Int = 2",
"let x : Int = 3 in x : Int";
"Test CDuce.lambda.let",
"let x : Int = 3 in x : Int",
"3",
"let x : Int = 3 in x : Int";
"Test CDuce.lambda.appl_identity_int",
"let x : Int = 3 in x : Int",
"(fun (x : `$A) : `$A = x) 2";
"2",
"(fun (x : 'A) : 'A = x) 2";
"Test CDuce.lambda.appl_identity_tag",
"let x : Int = 3 in x : Int",
"(fun (x : `$A) : `$A = x) `a";
"Atom(a)",
"(fun (x : 'A) : 'A = x) `a";
"Test CDuce.lambda.partial",
"let x : Int = 3 in x : Int",
"fun (`$A -> (Int -> Int)) | _ -> (fun (`$B -> `$B) y -> y)";
"Abstraction([(`$A,Int -> Int)],Id)",
"fun ('A -> (Int -> Int)) | _ -> (fun ('B -> 'B) y -> y)";
"Test CDuce.lambda.appl_partial",
"let x : Int = 3 in x : Int",
"(fun (`$A -> (Int -> Int)) | _ -> (fun (`$B -> `$B) y -> y)) 3";
"Abstraction([(`$B,`$B)],Id)",
"(fun ('A -> (Int -> Int)) | _ -> (fun ('B -> 'B) y -> y)) 3";
];;
let tests_compile = "CDuce compile tests (Typed -> Lambda )" >:::
......@@ -44,12 +41,11 @@ let tests_compile = "CDuce compile tests (Typed -> Lambda )" >:::
(* Typed -> Lambda -> Value *)
let run_test_eval msg expected totest _ =
let expected = parse_texpr_vexpr ~quite:true expected in
let totest = parse_cduce_vexpr ~quite:true totest in
assert_equal
~msg:msg
~printer:(fun x -> x)
(Value.Print.string_of_value expected)
expected
(Value.Print.string_of_value totest)
let tests_eval = "CDuce evaluation tests (Typed -> Lambda -> Value )" >:::
......
......@@ -2897,7 +2897,7 @@ module Tallying = struct
type t = Descr.s E.t
let compare = E.compare compare
let equal = E.equal equal
let hash _= 1
let hash = Hashtbl.hash
let dump = E.pp
let check _ = ()
end)
......
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