test(tests/lean): 'using' command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
parent
fdeb457a81
commit
52e11dbbee
2 changed files with 28 additions and 0 deletions
17
tests/lean/using.lean
Normal file
17
tests/lean/using.lean
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
scope
|
||||||
|
using Nat
|
||||||
|
print add 0 1
|
||||||
|
check add_assoc
|
||||||
|
end
|
||||||
|
|
||||||
|
print add 0 1
|
||||||
|
|
||||||
|
namespace foo
|
||||||
|
using Nat
|
||||||
|
print add 0 1
|
||||||
|
end
|
||||||
|
|
||||||
|
using Nat::add plus
|
||||||
|
check plus_assoc
|
||||||
|
|
||||||
|
print add 0 1
|
11
tests/lean/using.lean.expected.out
Normal file
11
tests/lean/using.lean.expected.out
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
Set: pp::colors
|
||||||
|
Set: pp::unicode
|
||||||
|
Using: Nat
|
||||||
|
0 + 1
|
||||||
|
Nat::add_assoc : ∀ a b c : ℕ, a + (b + c) = a + b + c
|
||||||
|
using.lean:7:6: error: unknown identifier 'add'
|
||||||
|
Using: Nat
|
||||||
|
0 + 1
|
||||||
|
Using: Nat::add as plus
|
||||||
|
using.lean:15:6: error: unknown identifier 'plus_assoc'
|
||||||
|
using.lean:17:6: error: unknown identifier 'add'
|
Loading…
Reference in a new issue