Parser tests: move the contract description blocks tests to a separate folder and add a test for property accessors' contracts
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
fun baz(num: Int?, element: MyElement, block: () -> Unit): Int contract [
|
||||
callsInPlace(block, InvocationKind.EXACTLY_ONCE),
|
||||
returns() implies (num != null),
|
||||
returns() implies (element != null)
|
||||
] {
|
||||
require(num != null)
|
||||
require(element != null)
|
||||
block()
|
||||
if (num >= 0) {
|
||||
return 1;
|
||||
}
|
||||
return 0
|
||||
}
|
||||
Reference in New Issue
Block a user