test: add test for proof syntax

This commit is contained in:
Simon Cruanes 2022-10-07 21:41:18 -04:00
parent 1bc6f0ef5c
commit ff2600a4e9
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -43,7 +43,9 @@ let test_decl what s =
| Ok l -> | Ok l ->
Fmt.printf "@[<v2>%s:@ %a@]@." what (Util.pp_list ~sep:"" A.pp_decl) l Fmt.printf "@[<v2>%s:@ %a@]@." what (Util.pp_list ~sep:"" A.pp_decl) l
| Error err -> | Error err ->
Fmt.printf "FAIL:@ error while parsing %S:@ %a@." what P.Error.pp err Fmt.printf "FAIL:@ error while parsing %S:@ %a@." what
(P.Error.pp_with_loc ~input:(Loc.Input.string s))
err
let () = let () =
test_decl "d1" test_decl "d1"
@ -51,3 +53,11 @@ let () =
#ty f; #ty f;
#sledgehammer fn x y. f x y = f x y; #sledgehammer fn x y. f x y = f x y;
|} |}
let () =
test_decl "d2"
{|theorem foo := (a=b) => (f a = f b)
{ have s1 := b=a by obvious;
have s2 := f b = f a by congr f s1;
exact symm s2
}; |}