-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
23 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/test/resources/regressions/features/assume/assume-simple-01.gobra
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// Any copyright is dedicated to the Public Domain. | ||
// http://creativecommons.org/publicdomain/zero/1.0/ | ||
|
||
package assumption | ||
|
||
type person struct { | ||
name string | ||
age int | ||
} | ||
|
||
func f() { | ||
p := &person{name: "Pereira", age: 12} | ||
assume acc(p) // impure assume does not lead to contradiction | ||
//:: ExpectedOutput(assert_error:assertion_error) | ||
assert false | ||
} | ||
|
||
func g() { | ||
p := &person{name: "Pereira", age: 12} | ||
inhale acc(p) // inhale leads to contradiction | ||
assert false | ||
} |