repo
stringclasses
966 values
path
stringlengths
5
283
license
stringclasses
13 values
stars
int64
0
3.47k
default_branch
stringclasses
15 values
commit_sha
stringclasses
966 values
pushed_at
stringdate
2015-04-17 10:56:12
2026-07-22 05:29:38
size_bytes
int64
0
1.91M
sha256
stringlengths
64
64
content
stringlengths
0
1.91M
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-332.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
710
eb2656d5f82187c82d5f301f603d0c6a3a1b28ad6d2c3f83be76379c24719761
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment method Main() { var foo := new B.Foo(15); print foo.I(), "\n"; } abstract module A { class Foo { var x: int constructor (u: int) { x := u; } twostate function F(): int reads this twostate pred...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3320.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
473
83e8777bbe3871d49d0907f1b4c9fb7c7be002ac878aaa7411a5f9b2b0a9348e
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" datatype Dt = A | B(b: set<nat>) function SetComprehension(s: seq<Dt>): set<nat> { set i, b | 0 <= i < |s| && s[i].B? && b in s[i].b && 1 != 2 :: b } function MapComprehension(s: seq<Dt>): map<int, int> { map i, b | 0 <= i < |s| && s[i].B? && ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-334.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
388
657ccef01d6c31817e051d7c77e17bfd91b938ed08248c82235c463e28982b67
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" function FromAtoB(a: seq<int>): seq<int> { // regression: the following had once crashed the translator seq(|a|, i => a[i]) // error: index out of bounds } function FromAtoC(a: seq<int>): seq<int> { // regression: the following had once cras...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3358.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
282
d31081934c64971735ed2e5b6220a645e65d5565c7eea1b4f5c7828fcf99d348
// RUN: %verify "%s" --allow-warnings > "%t" // RUN: %diff "%s.expect" "%t" datatype MyResult = Ok | Err(error: set<string>) function warningTriggerTest(sr: seq<MyResult>): set<string> { set i, err | 0 <= i < |sr| && err in (if sr[i].Err? then sr[i].error else {}) :: err }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-336.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
793
d76fd32c8058d78a42ebc691b8f601e182b56ee0f22099ce1871a0a202893ca6
// RUN: %testDafnyForEachResolver "%s" lemma TestMap(a: map<int, (int,int)>) { // The following assertion used to not prove automatically assert (map k | k in a :: k := a[k].0) // the following map comprehension implicitly uses k as the key == (map k | k in a :: a[k].0); } lemma TestSet0...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3366.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
362
7eda665d9a26dd82ed62c0dfc51ab5c0d93b6aa77faf9af27dbb188573b37943
// RUN: %exits-with 2 %baredafny verify --show-snippets:false --use-basename-for-filename "%s" > "%t" // RUN: %diff "%s.expect" "%t" class C<T> { constructor (x: T) {} } datatype O<T> = Some(x: T) | None method main() { // works var v := new C<nat>(0); var c := Some(v); // fails when inlinin...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3370.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
307
2c9c29afd23276d6e5fe751a8ca74a1e7d3ba844f5e07c6ffa42a5ee69c1528f
// RUN: %baredafny build --use-basename-for-filename --show-snippets:false "%s" > "%t" // RUN: %exits-with 4 %baredafny build --use-basename-for-filename --show-snippets:false --enforce-determinism "%s" >> "%t" // RUN: %diff "%s.expect" "%t" method m() { var a: array<int>; a := new int[10]; }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3377.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
205
941b99e383c0cf5d8938e58ca017c5133a47adbb2543b1aed072f5f7eee464c9
// RUN: %exits-with 2 %baredafny test --show-snippets:false --use-basename-for-filename "%s" > "%t" // RUN: %diff "%s.expect" "%t" method {:extern} {:test} m(i: int, ghost j: int) requires j == 1
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3382.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
206
0d476cc784865c2bf2fdb7a387532d0c0c3de4de48263fcd744618fa9ae0dce8
// RUN: %resolve "%s" > "%t" // RUN: %diff "%s.expect" "%t" newtype uint16 = x | 0 <= x < 0x1_0000 datatype D = A | B ghost function F(x: D): uint16 { match x case A => 12 case B => 13 }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3390.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
174
eb4dcb81c6a958e4c8ff0ee2b3c4dda0784fb130aa0768c768bba9a97735039e
// RUN: %exits-with 2 %baredafny resolve --use-basename-for-filename "%s" > "%t" // This example gives a confusing error message const z := 1 as bv4 | 1 as bv2 << 2
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3411.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
204
b1c616b25c3732118403aa38eb4945ebad4a3aa11423d3619674428a4ba2d5dc
// RUN: %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" method Test(f: int -> int) { assert seq(1, x => f(x))[0] == f(0); // No problem assert seq(1, f)[0] == f(0); // No problem anymore }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-343.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
181
34fb313abfddbf73dcc1c4308163637c62596e3022651b45055b319a71f5af19
// RUN: %exits-with 2 %verify --type-system-refresh=false --general-newtypes=false "%s" > "%t" // RUN: %diff "%s.expect" "%t" method f(a: seq<int>) { var t := a[a .. 1]; }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3449.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
400
5a9263417e437b19d0e66a2509b9c3776c76a757fb981cf3f66efa854aa5deee
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" class Basic { } method Test() { // "new object" allocates an object of an abitrary type var obj: object := new object; if * { assert !(obj is Basic); // error: no reason to think obj couldn't be a Basic } else { assert !(obj is a...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3461.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
379
d1810593fec1a913c4b63a90e6012836cd55ce3def85c96901683011b5fc35ce
// RUN: %exits-with 2 %resolve "%s" > "%t" // RUN: %diff "%s.expect" "%t" opaque method m() {} // NO opaque const c := 5 // OK opaque function f(): int { 42 } // OK opaque predicate p() { true } // OK opaque class A {} // NO opaque datatype D = D // NO opaque newtype N = int // NO opaque type P = i | i...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3461b.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
291
a16068d2d70fb9a48dad063f9b65be0b212a82381726aad3d9a5aa837f3225ae
// RUN: %exits-with 4 %verify --allow-axioms "%s" > "%t" // RUN: %diff "%s.expect" "%t" const d := 42 opaque const c := 5 // OK method z() { assert c == 5; // No - opaque } method p() { assert d == 42; // OK } method q() { reveal c; assert c == 5; // OK - revealed }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3472.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
219
162bcd204e42542e4efc1249ff5fa0f122713aec27c0a21ce91a6b9987665c1f
// RUN: %baredafny build --no-verify %args "%s" > "%t" // RUN: %diff "%s.expect" "%t" datatype X = Set(s: set<int>) method Foo(xs: X) { match xs { case Set(s: set<int>) => var x :| x in s; } }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3475.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
804
2855eb6658637a4f76b2d616f2521d0297302d97a4a86c0d4eb3a539b20a177b
// RUN: ! %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" module Test { method foo() returns (y: int) { x :- bar(); } method bar() returns (y: Result<int>) // return type doesn't matter datatype Result<+U> = | Success(value: U) | Failure(exception: string) { ghost func...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3482.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
221
a3f9dd68014c2d2dac9c69fecbd2052ee024da08feceb628ab21806d32477d21
// RUN: %verify "%s" --allow-warnings > "%t" // RUN: %diff "%s.expect" "%t" datatype X = X lemma Foo(x: X) returns (y: bool) { match x { case X => return old(x) == x; case _ => } return false; }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3496.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
179
d4a67a75c628c6ded05e068468bd7d2ff9d40f9599301750df2a44825f58ab1e
// RUN: %resolve --allow-axioms:false --allow-warnings "%s" > "%t" // RUN: %diff "%s.expect" "%t" method m() { assume true; } method p() { assume {:axiom} true; }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3497.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
138
6f965efa83c8a6bec3186ddf69fdba0f62c502e82795e2c8224da1fa61cc9e73
// RUN: %resolve "%s" --allow-warnings > "%t" // RUN: %diff "%s.expect" "%t" method m() { forall ensures true { } }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-351.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
240
8bab3adb55e029ab08b06f077f8e085f9ee76cdcf4d7003eeaf2d8a911fcfd8e
// RUN: %testDafnyForEachResolver "%s" function DecodeRecursively(s: seq<int>): (b: seq<int>) { seq(|s|, i requires 0 <= i < |s| => var d := s[0]; // this line produced the reported error, prior to the fix s[i] ) }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-353.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
153
85144e0149ba9f99ebcda9cce7722dcaa964b97cc78ae469f668acd452e13725
// RUN: %testDafnyForEachResolver "%s" type A = s : seq<int> | |s| < 10 method f(a: seq<A>) ensures multiset(a[..]) == multiset(a[..]) { }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-354.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
262
ef937051ada92d144dc0b65d96895abfe37ed2412f6fa7d4f3c25058fd5f7961
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment class C<X(0)> { static const u: X } method Main() { print C<int>.u, "\n"; print C<nat>.u, "\n"; print C<real>.u, "\n"; print C<bool>.u, "\n"; }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3549b.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
84
12ae6b6bed9a3e99799b83cf14861f382902190893c692dc2b0799aa7e0623eb
// RUN: %exits-with 1 %baredafny resolve "" > "%t" // RUN: %diff "%s.expect" "%t"
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-356-errors.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
3,542
e419720662b089ef7e0090d88a660ce8ced016ea6737534213d281071bd5529d
// RUN: %exits-with 4 %verify --allow-deprecation --unicode-char false --type-system-refresh=false --general-newtypes=false "%s" > "%t" // RUN: %diff "%s.expect" "%t" // Check every possible conversion range error among int,char,bv,real,ORDINAL // int to char method Test1(n: int) { var ch := n as char; /...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-356-errors2.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
598
a4c8cc90b1845b0afeeb675529bd91aba6dba065ddd717858e82656b6a99648e
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" // Subset tsype conversions type Tx = x | 0 <= x <= 100 method TestD(x: Tx) { var z := x as Tx; var c := x as char; var n := x as int; var r := x as real; var b := x as bv8; var o := x as ORDINAL; } method TestF(cc: char, nn: int, ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-356.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
10,792
04809eec4208b802bcc907e1438d6fa9fe474347ac336544553ecb6cd1ef974a
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --type-system-refresh=false --general-newtypes=false --relax-definite-assignment --allow-deprecation --unicode-char false module M { type Tx = i: int | 0 <= i <= 100 newtype Tr = r: real | r == r.Floor as real && 0.0 <= r <= 100.0 method Main...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3571.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,029
563aed7c6b8a7c8da105ee55daf7054a9688f26afa3beb2f338411c1eceea4d3
// NONUNIFORM: Testing CLI options handling, not actual compilation // RUN: %resolve --function-syntax:4 --function-syntax:3 "%s" > "%t" // RUN: %resolve --quantifier-syntax:3 --quantifier-syntax:4 "%s" >> "%t" // RUN: %build --target:java --target:cs "%s" >> "%t" // RUN: %resolve --unicode-char false --unicode-c...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3572.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
108
d039e4ad797a6180f87fecf0d5122e4d72d600f391514deeb546447b190645e4
// RUN: %exits-with 1 %baredafny verify --solver-plugin x test.dfy 2> "%t" // RUN: %diff "%s.expect" "%t"
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3605.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
470
03498d4eff6dd460dd8a6b1f146754f10e49a67c7bbaf9d6f23a08afc6d654ea
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" class C { } method M() ensures false { ghost var s, r; s := set c: C | True(c); label L: r := Id(s); var c := new C; assert c in s; // error: the elements of s were all allocated before label L, and in particular before "c := ne...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3606.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
727
d53d30e556214e219228c3324bd3c26fefdb8c428533d462736d20cdcc34127b
// RUN: %exits-with 2 %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" class C { } function F(): int // The following is disallowed, since the set comprehension depends on the allocation state (via c). // That would make F depend on the allocation state, which is not allowed. reads set c: C, obj: obje...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3607.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
883
c70f5b7c6b21ad94620c3d3e4ad9faa2fbc50164baf93b4638a31cf76afede00
// RUN: %exits-with 2 %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" class Cell { ghost var data: int } method M(cc: Cell) ensures false { var f: () ~> set<Cell> := () reads set c: Cell | c in {c} // error: depends on the allocation state => set c: Cell | c.data == 17; // error: d...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-362.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
428
bb38688deb2b2f68b5839424b9fbdb7a21369921d8e8f1262e0519c335278c4d
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" function IsLetter(c: char): bool { 'A' <= c <= 'Z' } type Letter = c: char | IsLetter(c) witness 'A' ghost function Test(c: Letter): Letter { var r := c + 1 as char; assert true; // <-- the error "value does not satisfy the subset constraints of...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-364.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,244
c0db595ee183d2ddc6d4cd2aab6fc554b7613329568089486ef814e2f03db77e
// NONUNIFORM: https://github.com/dafny-lang/dafny/issues/4742 // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment datatype NatOutcome = | Success(value: nat) | Failure(error: string) { predicate IsFailure() { this.Failure? } // translation of "this" in well-...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3691.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
182
d8fbf6d147b78e7051b6da478e1e90daa1a7130d6e26a05365f10beeaf850993
// RUN: %testDafnyForEachResolver "%s" trait A { predicate f() method g() ensures f() } class B<T> extends A { predicate f() { true } method g() ensures f() }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-370.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,374
75f49320a9e69d65d3e3156b5645b4cbc8b8eb2412c3ab0d177e6730d6dd5659
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" // Issue 370 reported a situation where there were 6 errors, but only 5 of // them are reported, since there's a limit of 5 error messages per method. // The confusing part was that the omitted error was the first of the 6, // which makes it appear as ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-371-errors.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
343
9ceb644fde092b85f5995ec4fb87a163e6589c926ca6b62fd86dfd56684aa40c
// RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s" module M { type TT = int } module MA { module Inner { type T17 = x | 0 <= x < 17 } } module MB { module I { type T42 = x | 0 <= x < 42 type T43 = x | 0 <= x < 43 } } import M // Error module A { import M ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-371-errors2.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
449
fec47c1a2a3cafa5223897da8d02417fb52ffb5c609e59e17702096afdad4b7a
// RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s" module M { type TT = int } module MA { module Inner { type T17 = x | 0 <= x < 17 } } module MB { module I { type T42 = x | 0 <= x < 42 type T43 = x | 0 <= x < 43 } } module B { import MAI = MA.Inner // now OK ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-371.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
523
a7c7becd5f95828d1278270b1c38925d5abc61cff19bf488feab2d4899181b7e
// RUN: %testDafnyForEachResolver "%s" -- --print:- module M { type TT = int } module MA { module Inner { type T17 = x | 0 <= x < 17 } } module MB { module I { type T42 = x | 0 <= x < 42 } } module A { import TTT = M import M import MA import MAI = MA.Inner ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3719.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
431
9a5d8aeb4ef8c41ca4765bdf7165dacbd2ad1252e150569ae2cf7c2b9d652ca5
// RUN: %exits-with 4 %verify --allow-axioms "%s" > "%t" // RUN: %diff "%s.expect" "%t" opaque function inc(x: nat): nat { x + 1 } // Intermediate to force lambda predicate CheckThis(p: () -> bool) { p() } opaque const one: nat := 1 method test() { assert CheckThis(() => inc(1) == 2); // Error on this...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3719a.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
190
005b04ad4e193f1ad987013f5a1cda301290695499ec264f29903cfae22bb9f9
// RUN: %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" ghost opaque function R(i: int): int { i } lemma Test() { assert 1 == R(1) by { reveal R(); } assert 1 == R(1); }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3719b.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
223
fa0f0676947c6cd18bfb11eb3ee6e332c64178963f354e3ed36f4757d2baa3f6
// RUN: %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" opaque predicate P(i: int) { true } method testCallOpaqueAssert() { assert f0: P(0) by { reveal P(); } assert P(0) by { reveal f0; } }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3734.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
3,957
f5a1d8e15096f8a04c9f5ab6cccdb0be0b7025d19f5dbff8c70fe2a00827e6b0
// RUN: %baredafny verify "%s" // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" newtype uint8 = x : int | 0 <= x < 256 method Main() { var y := 0x80 as bv8; var x := (y >> 4) as uint8; print y, " >> 4 == ", x, "\n"; assert x != 248; // What Java obtained before when computing "y >>> 4" ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-374.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
230
4eedcc87eacab5ca927f45864cf8e92ad44572f1c35dd31ee996138adba06ac4
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment class C { constructor(ghost x: int) { } } ghost function f() : int { 0 } method Main() { var c := new C(f()); }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3744.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
253
d9110ff5af9af081430f7ed7610b7b51c86cb41ab1da00f81f2d28566f895df2
// NONUNIFORM: Multiple test scenarios (could be split) // RUN: %baredafny test "%s" > "%t" // RUN: %baredafny run "%s" >> "%t" // RUN: %diff "%s.expect" "%t" method Main() { print "Main\n"; } method {:test} Test() { print "Test\n"; }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3757.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
145
ffa5c33afb593d34d88424d9ccc293ef38de39bcf61617f872fd28223f034a46
// RUN: %exits-with 2 %baredafny resolve --show-snippets:false --use-basename-for-filename "%s" > "%t" // RUN: %diff "%s.expect" "%t" const
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3757a.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
147
6e344848461375982c586fd43b6ca4dbe461e123d7bc42443c432c2621f6acbf
// RUN: %exits-with 2 %baredafny resolve --show-snippets:false --use-basename-for-filename "%s" > "%t" // RUN: %diff "%s.expect" "%t" const +
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3792.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
533
73718af3eee9d42b9ef6306e2e2774ee9893e0d9d5d6c1ffb74882da48f38724
// RUN: %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" /// # Random variable. extracted from any number of bits datatype ImapSimulator_<!A, B> = ImapSimulator( input: iset<A>, apply: A --> B) { ghost predicate Valid() { forall i <- input :: apply.requires(i) } } type Ima...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3804.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,459
bda3dea3eb0151670767e39213f98443676b4284a4eefe10205e1e2203f33093
// RUN: %exits-with 4 %verify --type-system-refresh=false --general-newtypes=false "%s" > "%t" // RUN: %diff "%s.expect" "%t" predicate P(x: int) function FirstAssertNotProved(): (i: int) ensures P(i) { assert rule2: P(12) by { // error: cannot be verified here } assert P(12) by { reveal rule2;...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3804a.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
417
8425c9ae39a5349caa235bae1bb4814a4a7e35b8d551c0e568887586ab85bc71
// RUN: %exits-with 2 %verify --type-system-refresh=false --general-newtypes=false "%s" > "%t" // RUN: %diff "%s.expect" "%t" predicate P(x: int) function DoesNotPass(x: bool): (i: int) ensures P(i) requires rule: P(12) { assert rule: P(12); // Error here, rule is dominated. assert rule2: P(12); ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3804b.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,505
e1f214b82defbb1aa5750cb9b2b8a20fe7e9149875338f0d23f87e3fbed0dd66
// RUN: %exits-with 4 %verify --type-system-refresh=false --general-newtypes=false "%s" > "%t" // RUN: %diff "%s.expect" "%t" function RevealInFunctionNotMethodOk(i: int): (r: int) requires p: i >= 0 ensures r >= 0 { reveal p; i } by method { r := i; } function NoRevealNotOk(i: int): (r: int) /...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3804c.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
895
343199d375e81cad64b07589ff44b41ec1a950810b76428c4373fe17d4c70d49
// RUN: %exits-with 4 %verify --type-system-refresh=false --general-newtypes=false "%s" > "%t" // RUN: %diff "%s.expect" "%t" predicate P(i: int) function Test(x: bool): int requires r: if x then P(1) else P(2) { assert p1: x ==> P(1) by { reveal r; } assert p2: !x ==> P(2) by { reveal r; } var x :=...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3804d.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
795
cd88809c8a0b771a6b395b590df211aaaec936ba6b3205386b0d31523a762cfd
// RUN: %exits-with 2 %verify --type-system-refresh=false --general-newtypes=false "%s" > "%t" // RUN: %diff "%s.expect" "%t" predicate P(i: int) method MethodTestNoLeak(x: bool) requires r: (x <==> P(12)) && P(12) != P(13) { var result := if x then assert p: P(12) by {reveal r;} assert...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3809.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
568
2bd3b53f713a8bd9b12bd816c3015a2516365633261c493cff210f52bb849496
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" module m { datatype D = A | B | C { static const Default: D := B // This one will be translated as Default_ method Default_() { // Just to be sure there is no clash: this is translated as Default__ print "De...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3855.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
50,867
173d1c61f4c59bbf1b39df0b24d044ab80097d7f6880abb207a7c3ab30ecf2de
// RUN: %exits-with 4 %baredafny verify --show-snippets:false --allow-axioms --allow-deprecation --use-basename-for-filename --type-system-refresh=false --general-newtypes=false "%s" > "%t".raw // RUN: %sed 's/after [0-9]+ seconds/after <redacted> seconds/' %t.raw > "%t" // RUN: %diff "%s.expect" "%t" // Nearly verb...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-386.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
497
dc3600dff26344f21764c80b370db9c6f5c68089644a2c1f3f28a3eaaef61128
// RUN: %testDafnyForEachResolver "%s" class Foo { // this is accepted constructor(ghost b: set<bool>) {} constructor Mk() {} method Initialize(ghost b: set<bool>) {} } method TestConstructor() { ghost var b: set<bool> := {}; var f := new Foo(b); // error: ghost variables are...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3868.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
7,014
a96f1794874d5b43271fcb3f4e5d801d655c7844f0a5f6350c3b0dfcef3cf141
// RUN: %testDafnyForEachCompiler "%s" method Main() { var r := NotOptimized("let"); print r, "\n"; // 15 var recur := new Recur(25); print NotSoDeep("1900"), "\n"; print WoahThat'sDeep(A, "42"), "\n"; print WoahThat'sDeepToo(AA("i", "ii", "iii", "iv", "v", "vi", "vii", "viii", "ix", "x"), "555"), ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3868a.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
431
90e4ab6c9cac390ba02e9cbaaf86e8c063d26ec3d365ad81211970382b913e94
// RUN: %baredafny translate java %args %s --output=%S/git-issue-3868a // RUN: %OutputCheck --file-to-check %S/git-issue-3868a-java/_System/__default.java "%s" // CHECK: Let\( // See comment in git-issue-3868b.dfy method NotOptimized(s: string) returns (r: int) { // We expect the Java compilation of the foll...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3868b.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
2,131
b53d748c89e613a1c78d65e3e3a3be584fff1d17f4c804aca114c36262ad95af
// RUN: %baredafny translate java %args %s --output=%S/git-issue-3868b // RUN: %OutputCheck --file-to-check %S/git-issue-3868b-java/_System/__default.java "%s" // CHECK-NOT: Let\( // If the nested let expressions in the following function generate nested lambdas in Java, // then the Java compiler chokes (either b...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3873.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
356
b3a01f3a3bdb97e3941e6b5a6056d64471637f8e9b2c862f687684539bd6a533
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" method Main() { M0(); M1(); } method M0() { var a := new ()[1]; var m: map<array<()>, ()> := map[a := ()]; var v :| v in m by { assert a in m; } print v[0], "\n"; } method M1() { var a := new ()[1]; var v :| v in map...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3883.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
2,947
aa84a3368e5856fbc7367b16bceb95346c3a1e765ffc5617f246d7be0bd077ee
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" type MyType<T> = x: T | true witness * // this used to not compile (C#, Java, Go) -- issue #3883 type MyInt<T> = x: int | true witness * method Main() { var a: MyType<int> := 13; // this used to not verify (issue #3891) TestMyTest(a, 14); // 13 1...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3908.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
749
22fdb079c5c59b179e10e3d1e21623e7a2257a465ae97c46e4ccc82004c91439
// RUN: %testDafnyForEachResolver "%s" datatype List<T> = Nil | Cons(T, List<T>) method UnexpectedError<G>(l: List<G>) { var x0: real; match l case Cons(x: G, y) => x0 := 31.4; // this once generated a bogus error that real cannot be assigned to G case Nil => } method UnexpectedDuplicateNa...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3918.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
523
8b3ee79cd63f140e99ca58e121c325ef4654c3a6c8cb4ece5c7c5c57200f63db
// RUN: %exits-with 2 %build "%s" > "%t" // RUN: %diff "%s.expect" "%t" // The two errors below had previously slipped by the resolver, causing malformed compiled code. datatype Outer = Outer(ghost inner: Inner) datatype Inner = Inner(x: int) method M(o: Outer) returns (r: int) { match o case Outer(Inn...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3921.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,808
37fba70b5cf5acfdc3968ae2aaf93d83bb0ac793e0459addc88b6966ac20fa29
// RUN: %exits-with 2 %build --type-system-refresh=false --general-newtypes=false "%s" > "%t" // RUN: %diff "%s.expect" "%t" module A { type SubsetType<X> = x: int | true method M() { var s: SubsetType; // error: type argument underspecified s := 3; } datatype Record<U> = Record(SubsetType...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3922.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,371
5069ee6e832316aceadcb32574b04a5ff54e6b309d0aa88315c3727e507b663e
// RUN: %exits-with 2 %build --type-system-refresh=false --general-newtypes=false "%s" > "%t" // RUN: %diff "%s.expect" "%t" module A { datatype Record = Record(o: object) class C { } method M(r: Record) requires r.o is C { match r case Record(c: C) => // error: not allowed to down-ca...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3923.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,300
cc466f5f26b0b3225f4a2d27050dfe6bab020e27c1bd586aaf75177e461e9d97
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" method DoSomething() { } datatype Fruit = Apple(u: int) | Pear(t: int) method Abc(fruit: Fruit) { match fruit case Apple(x) => DoSomething(); case _ => } method Def(fruit: Fruit) { match fruit case Apple(_) => DoSome...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3955.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
387
a0afdc4e63d9f79a1fbcf1d9889095fc9fd82a6b6738f3f1c4f2d1f12d437d3a
// RUN: %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" class A { var x: int predicate Valid() reads this { x >= 0 } } datatype B = B( a: A ) { opaque predicate Valid() reads a { a.Valid() } } class C { var a: A constructor() opaque twostate predicate Valid()...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3956.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
281
4290a7a04b290256881dc57605ea1832ab859628ebae1c59a1dd0389e715127e
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" datatype AAA<X> = CtorA datatype BBB<Y> = CtorB type AaaBbb<R> = AAA<BBB<R>> datatype MyType<W> = MyType(n: AaaBbb<W>) method Main() { var m: MyType<char> := MyType(CtorA); print m, "\n"; // AAA.CtorA }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-396.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
336
c4aace90f249c322ab2261708a74f3d49746b4c6312fcda49498739b275c38d1
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment datatype Foo = Bar(value: int) method GetValue(f: Foo) returns (i: int) { match f case Bar(Bar) => return 72 + Bar; } method Main() { var x: int := 0; var f: Foo := Bar(42); x := GetValue(f); pri...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3962.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
610
babafc19aa41c49082dd3a8fbe6c8b0e0e8040c3983af381f86358ed96048a24
// RUN: %exits-with 4 %build --show-hints "%s" > "%t" // RUN: %diff "%s.expect" "%t" method Issues(a: bool, s: set) { // Each one of the following 8 calc statements used to cause a crash if case true => calc { a; <== false; } case true => calc { true; <== a; } case true => calc { a; ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3978.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
190
8c02a447291bb27b584799cfc6ab75a11f2e62023842208f1d5ffca129c4fd3c
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" method Main() { for v := 3 to 18 { if false { continue; } var x := 1; print x, "\n"; } }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3987.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
280
524d6bda414a6ae569463fbafa14ae5768b505fae78447baae8fba3ed95c7cd7
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" datatype D = A method Main() { //Clone match A { case A => var a: array<nat> := new nat[1](i => i); forall i | 0 <= i < a.Length { a[i] := i; } } print "pass\n"; }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3995.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,269
a30bc2ffd34f0fc533d2da33690dceca870f98b50d031182e2c96c43fd919e9d
// RUN: %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" trait Animal { function not_opaque() : ( rv : int) function {:opaque} iam_opaque() : ( rv : int) predicate depends_on_not_opaque() ensures not_opaque() == 42 predicate depends_on_iam_opaque() ensures iam...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4000.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
312
0b5b8234fe24161dba2f7cc629b5e314a3bbfaf54339a31a306138d7be79ee55
// RUN: %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" module Gas { const STATICCALL : nat := 0xfa function f(op: nat, s: int): int { match op case STATICCALL => 0 case _ => s } lemma MatchIsCorrect() { assert f(0, 2) == 2; } }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4007.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
251
364b8d15a04069cde6ef47b1bedfbb3bdcbb3135d189d4739a7eed2e11f9af0a
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --allow-warnings --relax-definite-assignment method Main() { var a := 0; for i := 0 to |(set x: int | 0 <= x < 3 :: x)| { a := a + 1; } print a, "\n"; }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-401.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
189
e647f4a632b11780c14f8fe609efe7af5c5f4790496736adaf48d76c3e2ddf69
// RUN: %verify "%s" > "%t" // RUN: %verify --solver-option='PROVER_PATH=%z3' "%s" >> "%t" // RUN: %diff "%s.expect" "%t" // UNSUPPORTED: windows method m() { assert 1 + 1 == 2; }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4012.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
181
d3a176ea344de94d807c2def3895d1c6f46dfc0466ccc135d237cb9f62057881
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" method Main() { var m: multiset<()> := multiset{}; m := m[() := 18446744073709551616]; print |m|, "\n"; }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-401a.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
184
e95442e1ac00dfe8ee8a8eeba88fee50467c9cbe6ff0acb909ec8e6af5385dc8
// Dafny should emit exit value 1 // RUN: ! %verify --solver-option="PROVER_PATH=Output/binz/z3" "%s" > "%t" // RUN: %diff "%s.expect" "%t" method m() { assert 1 + 1 == 2; }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-403.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
385
101b4f1f12fc630088988100704df7f48b99b71badcf9840ac9ca90faf2a681e
// NONUNIFORM: nativeType has back-end specific behavior // RUN: %run --target java "%s" > "%t" // RUN: %diff "%s.expect" "%t" newtype {:nativeType "byte"} uint8 = x:int | 0 <= x < 0x100 newtype {:nativeType "int"} int32 = x:int | -0x8000_0000 <= x < 0x8000_0000 method Main() { var u8 : uint8 := 140; var...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4035.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,592
94ed22480e60defc422c923f4dc1a7bfd73a2c8d99d43d10400a438c267d79cd
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" module ConstInTrait { type ReallyEmpty = x: int | false witness * trait UnimplementableTrait extends object { const x: ReallyEmpty } method M(o: object) ensures false // error { if o is UnimplementableTrait { var u...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4046.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
994
2d2e4565d5a7e35a096d5857458ea2746f58e726a8e9eb28776d03dad54962f5
// RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s" module Library { export provides WhoKnows provides TraitX, TraitY provides ClassX, ClassY, ClassZ type WhoKnows trait {:termination false} TraitX extends object { } trait {:termination false} TraitY { } class ClassX ext...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4048.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
203
1f6e50b59fb51e995fe8b6d49c2f1e64bbcc7988fc377b2533432a07dc0242f4
// RUN: %exits-with 1 %baredafny build -t:lib --use-basename-for-filename "%s" x.doo > "%t" // RUN: %diff "%s.expect" "%t" // Tests case in which an input .doo file does not exist const c := 5
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-405.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
638
e69b7745f1801552bf673eac6747fd6a57c7ed22bcabee43f104a23ab89abfe8
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" const WITNESS := seq(10, i => 0) // This line alone suffices to cause the original bug type Seq10 = s: seq<int> | |s| == 10 witness WITNESS function WITNESS2(): seq<int> { seq(10, i => 0) } type Seq10a = s: seq<int> | |s| == 10 witness WITNESS2()...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4055.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
328
7a7686c83cb48a65a52546f1b3e99cdcbfb5038a414e6bc0638a529bb49c87bd
// RUN: %exits-with 4 %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" lemma LemmaOutsideofScaffolding2(a: int, b: int) ensures a == b { assert false; } lemma LemmaWithScaffolding() { assert {:only "after"} true; } lemma LemmaOutsideofScaffolding(a: int, b: int) ensures a == b { assert f...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4056.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
486
ff155956be1b4f14b94444e1a0fc9aaeb6b9967766940127b4049babbe0bfaa9
// RUN: %verify %s > %t // RUN: %diff "%s.expect" "%t" trait ADT extends object { ghost function ReprFamily(n: nat): set<object> decreases n ensures n > 0 ==> ReprFamily(n) >= ReprFamily(n-1) reads this, if n == 0 then {} else ReprFamily(n-1) } class P extends ADT { ghost function ReprFamil...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4074.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
512
3d611050595c16dfa3c02e893e4fa93de4e351391a11580f60aed9a197bef156
// RUN: %exits-with 4 %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" method {:only "wrongArgument"} TestReported() { assert false; // An error here } method TestNotReported() { assert false; } class A { method {:only} TestReported() { assert false; // An error here } method TestN...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4131.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
421
2d99e23668d0ee089c38fb38fad2e3e04c37cb26833986cca390bfbf3a966bb2
// RUN: %verify --type-system-refresh "%s" > "%t" // RUN: %diff "%s.expect" "%t" class Element { } class Foo { function Collect(M: set<Element>): bool reads this, set a | a in M // The legacy resolver inferred "a" in the following line to have type "Foo", // which results in a type error. This ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4139-main.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
106
934fe175041ed4a1f4201c64d6cb10ccfcd5c5c768c11b9b3c897904007d5231
// RUN: echo 'lit should ignore this file' class TestLogic''TopLevel { constructor () { } }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4139.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
165
685f3e6530d8ce38c39b57fc19fc330abcf07cda4efa9813920d529708fe1482
// RUN: %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" include "git-issue-4139-main.dfy" method Main() { var undertest := new TestLogic''TopLevel(); }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4141.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
368
40b9efd61755c510adbc70813f7d31de083fa4366e43763e3cd9742feafc523d
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" method Test<X(==)>(a: X, b: X) { print a == b, "\n"; } method Main() { var a := new bool[1]; var ars := [a]; a := new bool[1]; var ars' := [a]; Test(ars, ars'); ars[0][0] := true; Test(ars, ars'); ars'[0][0] := true; Te...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4152.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
665
33fe7399e19ec749142a64e10cc6b1b05806b56ad43cedefde4a2e7d250ad2cb
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --general-newtypes=false // This file tests legacy conversions. In the new resolver, these require explicit casts. method Main() { var a: bv8 := 0xFF; var b: bv16 := 0xFFFF; var c: bv32 := 0xFFFF_FFFF; var d: bv64 := 0xFFFF_FFFF_FFFF_FFFF; ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4162.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
420
b8bb941af5caef8e576441f534cf9191507e64f11938fb9fa2fd13ca7a4122be
// NONUNIFORM: %testDafnyForEachCompiler doesn't support /out // RUN: %run --target py --build M "%s" > "%t" // RUN: %run --target cs --build M "%s" >> "%t" // RUN: %run --target java --build M "%s" >> "%t" // RUN: %run --target js --build M "%s" >> "%t" // RUN: %run --target go --build M "%s" >> "%t" // RUN: %di...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4176.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
355
dd1cfd6eb0a4add8c04aa069a52222a0d2d9b93eeb511e284122103376e9e42e
// RUN: %verify %s > %t // RUN: %diff "%s.expect" "%t" method test(c: Class) { reveal Class.P(); reveal Class.Q(); reveal f(); assert c.P(); assert c.Q(); assert f(); } class Class { opaque function P() : bool { true } opaque twostate function Q() : bool { true } } ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4181.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
134
5d0eff97ecaed08612573bca2ed3de22dcde919432743e771e0b7da9332b3e27
// RUN: %testDafnyForEachCompiler "%s" module C { method Test() { print "done\n"; } } method Main(){ C.Test(); }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4188.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
393
1e5f82a2d6e78406ad6de48cf7d63e85bfb6b2d5a8d00153cbd58237b59e2bad
// RUN: %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" newtype T1 = nat newtype T2 = int newtype T3 = n: nat | true newtype T4 = i: int | 0 <= i method M(s1: set<T1>, s2: set<T2>, s3: set<T3>, s4: set<T4>) requires s1 != {} && s2 != {} && s3 != {} && s4 != {} { var i1: T1 :| i1 in s1; var i2: T...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4202.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
247
b05e0468569030d3a638fa9cf2bb6739d9967787e7373cb750814ae5a6ff8d64
// RUN: %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" opaque function F(x: int): char { 'D' } function InitArray<D>(f: int -> D): (a: D) { f(44) } method Main() { reveal F(); var c := InitArray(F); assert c == 'D'; }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4205.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
175
ace9a231f6a37fa250a732af2668d4a5d2b9890f5491bcb5b286737f151c4d7a
// RUN: %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" trait T { opaque function bar(): int } class F extends T { opaque function bar(): int { 1 } }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4205a.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
205
575e48ea2a14db0c48a1a9005c2ea9c02b9618224d518c4814baf76f852583f6
// RUN: %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" trait T { opaque function bar(): (r: int) } class F extends T { constructor() {} opaque function bar(): (r: int) { 1 } }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4217.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
330
d9ec640a8b226efdd1102ac26fae7f753482625a837a1e59a1e4ea1551abdbe0
// RUN: %testDafnyForEachResolver "%s" function SpecConverter(input: string): int { 1 } type StringWrapper { ghost const base: string } method Converter(value: StringWrapper) returns (res: int) // the following postcondition used to not verify ensures res == SpecConverter(value.base) { res ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4224.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,419
34361eabc6ad47c68e3f69a5a4e9fa946876028e2239262130e2528aa07c314a
// RUN: %exits-with 4 %verify --type-system-refresh=false --general-newtypes=false "%s" > "%t" // RUN: %diff "%s.expect" "%t" module Library { export OnlySome provides NeedlesslyParameterizedType export Everything reveals NeedlesslyParameterizedType type NeedlesslyParameterizedType<X> = bool }...