chore(tests/lean): replace run_cmd with #eval

This commit is contained in:
Leonardo de Moura 2018-08-23 13:32:25 -07:00
parent a1fffb2c9d
commit d0f6bbdf02
3 changed files with 5 additions and 7 deletions

View file

@ -41,18 +41,18 @@ match (expand' stx >>= resolve').run' cfg () with
| except.error e := tactic.fail e
| except.ok stx := tactic.trace stx
run_cmd test $ syntax.node ⟨`lambda, [
#eval test $ syntax.node ⟨`lambda, [
syntax.node ⟨name.anonymous, [syntax.ident ⟨info, `x, none, none⟩]⟩,
syntax.ident ⟨info, `x, none, none⟩
]⟩
run_cmd test $ syntax.node ⟨`lambda, [
#eval test $ syntax.node ⟨`lambda, [
syntax.node ⟨name.anonymous, [syntax.ident ⟨info, `x, none, none⟩]⟩,
syntax.ident ⟨info, `y, none, none⟩
]⟩
-- test macro shadowing
run_cmd test $ syntax.node ⟨`lambda, [
#eval test $ syntax.node ⟨`lambda, [
syntax.node ⟨name.anonymous, [syntax.ident ⟨info, `x, none, none⟩]⟩,
syntax.node ⟨`intro_x, [
syntax.ident ⟨info, `x, none, none⟩
@ -60,7 +60,7 @@ run_cmd test $ syntax.node ⟨`lambda, [
]⟩
-- test field notation
run_cmd test $ syntax.node ⟨`lambda, [
#eval test $ syntax.node ⟨`lambda, [
syntax.node ⟨name.anonymous, [syntax.ident ⟨info, `x.y, none, none⟩]⟩,
syntax.ident ⟨info, `x.y.z, none, none⟩
]⟩

View file

@ -1,6 +1,4 @@
(lambda_core (bind [x] x:0))
macro1.lean:49:0: error: unknown identifier y
state:
⊢ true
(lambda_core (bind [x] (lambda_core (bind [x!1] x:1))))
(lambda_core (bind [x.y] x.y.z:0.(z)))

View file

@ -15,7 +15,7 @@ trace_root ⟨1, 0⟩ `trace.type_context.is_def_eq "type_context.is_def_eq trac
⟩)
run_cmd
#eval
do let test opts := tactic.trace $ format.join $ list.intersperse format.line $ (test opts).to_list.map $ λ ⟨pos, tr⟩, to_fmt pos ++ ": " ++ tr.pp,
test options.mk,
tactic.trace "---",