test(tests/lean): 'using' command

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2014-01-09 12:21:14 -08:00
parent fdeb457a81
commit 52e11dbbee
2 changed files with 28 additions and 0 deletions

17
tests/lean/using.lean Normal file
View 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

View 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'