forked from dafny-lang/dafny
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow text and csv loggers together (dafny-lang#4714)
An extraneous `return` was preventing multiple verification loggers from running. By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.
- Loading branch information
Showing
2 changed files
with
42 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
42 changes: 42 additions & 0 deletions
42
Source/IntegrationTests/TestFiles/LitTests/LitTest/logger/MultipleLoggers.dfy
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,42 @@ | ||
// RUN: %exits-with 4 %baredafny verify --log-format:text --log-format:csv";"LogFileName="%t.csv" "%s" > "%t" | ||
// RUN: %OutputCheck --file-to-check "%t" "%s" | ||
// CHECK: Overall outcome: Errors | ||
// Check that the CSV file exists | ||
// RUN: %diff "%t.csv" "%t.csv" | ||
|
||
method ExampleWithSplits() returns (y: int) | ||
ensures y >= 0 | ||
{ | ||
var x: int; | ||
x := 5; | ||
y := 0; | ||
while (x > 0) | ||
invariant x + y == 5 | ||
invariant x*x <= 25 | ||
{ | ||
x := x - 1; | ||
assert {:split_here} (x+y) * (x+y) > 25; | ||
y := y + 1; | ||
if (x < 3) { | ||
assert 2 < 2; | ||
assert {:split_here} y*y > 4; | ||
} | ||
else { | ||
assert {:split_here} y*y*y < 8; | ||
assert 2 < 2; | ||
} | ||
assert {:split_here} (x+y) * (x+y) == 25; | ||
} | ||
} | ||
|
||
method ExampleWithoutSplits() { | ||
assert 1 + 1 == 2; | ||
assert 2 + 2 == 4; | ||
assert 3 + 3 == 6; | ||
} | ||
|
||
method AnotherExampleWithoutSplits() { | ||
assert 1 + 1 == 2; | ||
assert 2 + 2 == 4; | ||
assert 3 + 3 == 6; | ||
} |