nitlanguage
/
nit.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
contracts: change the contract syntax
[nit.git]
/
tests
/
contracts.nit
diff --git
a/tests/contracts.nit
b/tests/contracts.nit
index
b804288
..
ead9257
100644
(file)
--- a/
tests/contracts.nit
+++ b/
tests/contracts.nit
@@
-18,8
+18,8
@@
class MyClass
fun foo(x: Int)
is
class MyClass
fun foo(x: Int)
is
- expects(x == 1)
- ensures(x > 0)
+ expect(x == 1)
+ ensure(x > 0)
do
x = 0
end
do
x = 0
end
@@
-28,8
+28,8
@@
end
class MyClass2
fun foo(bool: Bool)
is
class MyClass2
fun foo(bool: Bool)
is
- expects(not bool)
- ensures(not bool)
+ expect(not bool)
+ ensure(not bool)
do
if bool then print "Error"
end
do
if bool then print "Error"
end