mirror of
https://github.com/c-cube/sidekick.git
synced 2025-12-06 03:05:31 -05:00
test: add test for proof syntax
This commit is contained in:
parent
1bc6f0ef5c
commit
ff2600a4e9
1 changed files with 11 additions and 1 deletions
|
|
@ -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
|
||||||
|
}; |}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue