Skip to content
Snippets Groups Projects
Commit 89a1be56 authored by Régis Blanc's avatar Régis Blanc
Browse files

more regression tests

parent 869ea546
Branches
Tags
No related merge requests found
object IfExpr1 {
def foo(): Int = {
var a = 1
var b = 2
if({a = a + 1; a != b})
a = a + 3
else
b = a + b
a
} ensuring(_ == 3)
}
object IfExpr2 {
def foo(): Int = {
var a = 1
var b = 2
if(a < b) {
a = a + 3
b = b + 2
a = a + b
}
a
} ensuring(_ == 0)
}
object IfExpr2 {
def foo(): Int = {
var a = 1
var b = 2
if(a < b) {
a = a + 3
b = b + 2
a = a + b
}
a
} ensuring(_ == 8)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment