Skip to content

Commit

Permalink
Convert all tests
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-aws committed Jun 10, 2023
1 parent 42255ac commit 3ab861b
Show file tree
Hide file tree
Showing 469 changed files with 2,165 additions and 8,689 deletions.
3 changes: 1 addition & 2 deletions Test/VerifyThis2015/Problem1.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:3 /print:"%t.print" /dprint:"%t.dprint" "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %testDafnyForEachCompiler "%s" -- --relax-definite-assignment

// Rustan Leino
// 12 April 2015
Expand Down
2 changes: 0 additions & 2 deletions Test/VerifyThis2015/Problem1.dfy.expect
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

Dafny program verifier finished with 18 verified, 0 errors
true
true
false
3 changes: 1 addition & 2 deletions Test/VerifyThis2015/Problem2.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:3 /print:"%t.print" /dprint:"%t.dprint" "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %testDafnyForEachCompiler "%s" -- --relax-definite-assignment

// Rustan Leino
// 13 April 2015, and many subsequent enhancements and revisions
Expand Down
2 changes: 0 additions & 2 deletions Test/VerifyThis2015/Problem2.dfy.expect
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@

Dafny program verifier finished with 32 verified, 0 errors
3 changes: 1 addition & 2 deletions Test/VerifyThis2015/Problem3.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:3 /print:"%t.print" /dprint:"%t.dprint" "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %testDafnyForEachCompiler "%s" -- --relax-definite-assignment
// Rustan Leino
// 12 April 2015
// VerifyThis 2015
Expand Down
2 changes: 0 additions & 2 deletions Test/VerifyThis2015/Problem3.dfy.expect
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@

Dafny program verifier finished with 18 verified, 0 errors
3 changes: 1 addition & 2 deletions Test/c++/arrays.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:3 /spillTargetCode:2 /compileTarget:cpp /unicodeChar:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %testDafnyForEachCompiler "%s" -- --relax-definite-assignment --spill-translation --unicode-char:false

newtype uint32 = i:int | 0 <= i < 0x100000000

Expand Down
2 changes: 0 additions & 2 deletions Test/c++/arrays.dfy.expect
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

Dafny program verifier finished with 9 verified, 0 errors
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
17
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22]
Expand Down
3 changes: 1 addition & 2 deletions Test/c++/bit-vectors.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:3 /spillTargetCode:2 /compileTarget:cpp /unicodeChar:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %testDafnyForEachCompiler "%s" -- --relax-definite-assignment --spill-translation --unicode-char:false

newtype uint64 = i:int | 0 <= i < 0x10000000000000000

Expand Down
2 changes: 0 additions & 2 deletions Test/c++/bit-vectors.dfy.expect
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@

Dafny program verifier finished with 6 verified, 0 errors
084841024
3 changes: 1 addition & 2 deletions Test/c++/class.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:3 /spillTargetCode:2 /compileTarget:cpp /unicodeChar:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %testDafnyForEachCompiler "%s" -- --relax-definite-assignment --spill-translation --unicode-char:false

newtype uint32 = i:int | 0 <= i < 0x100000000

Expand Down
2 changes: 0 additions & 2 deletions Test/c++/class.dfy.expect
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

Dafny program verifier finished with 16 verified, 0 errors
true true false
103 102 102 106 105 105
203 17 0 18 8 9 69 70
Expand Down
3 changes: 1 addition & 2 deletions Test/c++/const.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:3 /spillTargetCode:2 /compileTarget:cpp /unicodeChar:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %testDafnyForEachCompiler "%s" -- --relax-definite-assignment --spill-translation --unicode-char:false

module Holder {
const x:bool := false
Expand Down
2 changes: 0 additions & 2 deletions Test/c++/const.dfy.expect
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@

Dafny program verifier finished with 1 verified, 0 errors
3 changes: 1 addition & 2 deletions Test/c++/datatypes.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:3 /spillTargetCode:2 /compileTarget:cpp /unicodeChar:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %testDafnyForEachCompiler "%s" -- --relax-definite-assignment --spill-translation --unicode-char:false

newtype uint32 = i:int | 0 <= i < 0x100000000

Expand Down
2 changes: 0 additions & 2 deletions Test/c++/datatypes.dfy.expect
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

Dafny program verifier finished with 12 verified, 0 errors
Case A: 42
Case B: true
This is expected
Expand Down
3 changes: 1 addition & 2 deletions Test/c++/generic.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:3 /spillTargetCode:2 /compileTarget:cpp /unicodeChar:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %testDafnyForEachCompiler "%s" -- --relax-definite-assignment --spill-translation --unicode-char:false

class Test<T> {
var t:T
Expand Down
2 changes: 0 additions & 2 deletions Test/c++/generic.dfy.expect
Original file line number Diff line number Diff line change
@@ -1,2 +0,0 @@

Dafny program verifier finished with 3 verified, 0 errors
3 changes: 1 addition & 2 deletions Test/c++/hello.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:3 /spillTargetCode:2 /compileTarget:cpp /unicodeChar:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %testDafnyForEachCompiler "%s" -- --relax-definite-assignment --spill-translation --unicode-char:false

method Main() {
print "Hello world\n";
Expand Down
2 changes: 0 additions & 2 deletions Test/c++/hello.dfy.expect
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@

Dafny program verifier finished with 0 verified, 0 errors
Hello world
3 changes: 1 addition & 2 deletions Test/c++/ints.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:3 /spillTargetCode:2 /compileTarget:cpp /unicodeChar:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %testDafnyForEachCompiler "%s" -- --relax-definite-assignment --spill-translation --unicode-char:false

newtype sbyte = i:int | -0x80 <= i < 0x80
newtype byte = i:int | 0 <= i < 0x100
Expand Down
2 changes: 0 additions & 2 deletions Test/c++/ints.dfy.expect
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@

Dafny program verifier finished with 15 verified, 0 errors
Result is z = 42
3 changes: 1 addition & 2 deletions Test/c++/recursion.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:3 /spillTargetCode:2 /compileTarget:cpp /unicodeChar:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %testDafnyForEachCompiler "%s" -- --relax-definite-assignment --spill-translation --unicode-char:false

newtype uint32 = i:int | 0 <= i < 0x100000000

Expand Down
2 changes: 0 additions & 2 deletions Test/c++/recursion.dfy.expect
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

Dafny program verifier finished with 5 verified, 0 errors
x
!y
3
Expand Down
3 changes: 1 addition & 2 deletions Test/c++/returns.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:3 /spillTargetCode:2 /compileTarget:cpp /unicodeChar:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %testDafnyForEachCompiler "%s" -- --relax-definite-assignment --spill-translation --unicode-char:false

newtype uint64 = i:int | 0 <= i < 0x10000000000000000

Expand Down
2 changes: 0 additions & 2 deletions Test/c++/returns.dfy.expect
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@

Dafny program verifier finished with 3 verified, 0 errors
12
3 changes: 1 addition & 2 deletions Test/c++/seqs.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:3 /spillTargetCode:2 /compileTarget:cpp /unicodeChar:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %testDafnyForEachCompiler "%s" -- --relax-definite-assignment --spill-translation --unicode-char:false

newtype uint8 = i:int | 0 <= i < 0x100
newtype uint32 = i:int | 0 <= i < 0x100000000
Expand Down
2 changes: 0 additions & 2 deletions Test/c++/seqs.dfy.expect
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

Dafny program verifier finished with 11 verified, 0 errors
Head second:2
Trunc first:2
Head trunc: This is expected
Expand Down
3 changes: 1 addition & 2 deletions Test/c++/sets.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:3 /spillTargetCode:2 /compileTarget:cpp /unicodeChar:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %testDafnyForEachCompiler "%s" -- --relax-definite-assignment --spill-translation --unicode-char:false

newtype uint32 = i:int | 0 <= i < 0x100000000

Expand Down
2 changes: 0 additions & 2 deletions Test/c++/sets.dfy.expect
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

Dafny program verifier finished with 8 verified, 0 errors
Identity: This is expected
ValuesIdentity: This is expected
DiffIdentity: This is expected
Expand Down
3 changes: 1 addition & 2 deletions Test/c++/while.dfy
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// RUN: %dafny /compile:3 /spillTargetCode:2 /compileTarget:cpp /unicodeChar:0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %testDafnyForEachCompiler "%s" -- --relax-definite-assignment --spill-translation --unicode-char:false

newtype uint32 = i:int | 0 <= i < 0x100000000

Expand Down
2 changes: 0 additions & 2 deletions Test/c++/while.dfy.expect
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@

Dafny program verifier finished with 2 verified, 0 errors
0
1
2
Expand Down
9 changes: 2 additions & 7 deletions Test/comp/Arrays.dfy
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
// RUN: %baredafny verify %args --relax-definite-assignment "%s" > "%t"
// RUN: %baredafny run --unicode-char:false --no-verify --target=cs %args "%s" >> "%t"
// RUN: %baredafny run --unicode-char:false --no-verify --target=js %args "%s" >> "%t"
// RUN: %baredafny run --unicode-char:false --no-verify --target=go %args "%s" >> "%t"
// RUN: %baredafny run --unicode-char:false --no-verify --target=java %args "%s" >> "%t"
// RUN: %baredafny run --unicode-char:false --no-verify --target=py %args "%s" >> "%t"
// RUN: %diff "%s.expect" "%t"
// NONUNIFORM: https://github.com/dafny-lang/dafny/issues/4108
// RUN: %testDafnyForEachCompiler "%s" -- --relax-definite-assignment --unicode-char:false

method LinearSearch(a: array<int>, key: int) returns (n: nat)
ensures 0 <= n <= a.Length
Expand Down
Loading

0 comments on commit 3ab861b

Please sign in to comment.