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-258.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,466
aa10525d5c8196f79d2fd70c8e9ddeb146bc2127abf155ebe1de03810835833a
// NONUNIFORM: https://github.com/dafny-lang/dafny/issues/2582 // RUN: %testDafnyForEachCompiler "%s" -- --relax-definite-assignment --spill-translation --allow-deprecation --unicode-char false method pr<T>(s: seq<T>) { print s, "\n"; } method Main() { var a := new char[2]; a[0] := 'h'; a[1] := 'i';...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2581.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
136
277bba87e8e0446773645f6a6892032a00048c9ae1153c6fd878f02a89d0c2e8
// RUN: %testDafnyForEachCompiler "%s" method Main() { expect IsEmpty(""); } predicate IsEmpty<T>(s: seq<T>) { s == [] }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2593.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
137
d8304423944cbc468609c4382ef5ffd395e85a89451389a052d86cfc7a2d3875
// RUN: %testDafnyForEachResolver "%s" -- --allow-warnings ghost predicate P(x: int) lemma L() ensures forall y :: P(old(y))
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2597-resolution.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,525
e7a39e093a7bb24377a5ec831a6dd3ee1e71b605d4ccb94d00aac4a66f328bae
// RUN: %exits-with 2 %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" class C { var data: int method ResolutionIssues() requires old(data) == 3 // error: 'old' not allowed in this context requires calc { 0; { var d := old(data); } 0; } true // error: 'old' not allowed in this context { ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2597-verification.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
3,143
c215438fbf53123b0c4fbcdf66d71168e668292020ee6654c1b66aca27c03be2
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" class C { var data: int lemma DataIs(x: int) requires data == x { } method VerificationIssues() requires data == 3 modifies this { data := 100; ghost var x, y; x := old(5 + assert data == 3; 0); y :...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2605.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
353
50f81066240657588fffa6730ad4157af0cf422e5f2d2c55fc262c4037cda3e8
// RUN: %exits-with 4 %verify --error-limit 0 "%s" > "%t" // RUN: %diff "%s.expect" "%t" method M(a: array<int>, j: int) { forall n | 0 <= n < 100 ensures n / 0 == n / 0 // error (x2): division by zero ensures a[j] == a[j] // error (x2): array index out of bounds { assert false; // error ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2608.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
550
7ed445b3efeecf87035838e953db4fa7fbb577cf71bbcade2ea97a2e2abecf02
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment method GetNext(i: int) returns (j: int, possible: bool) { if i == 1 { possible := false; j := 0; } else { possible := true; j := if i % 2 == 0 then i / 2 else i * 3 + 1; } } method Main() { ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-261.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
220
a8fc3a7fe0003782e989027a00da6d915f325857d05ce34f3f56421a7349a311
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" datatype Option<T> = None | Some(T) method Main() { var x : Option<(nat, nat)> := Some((2,3)); var Some((a,b)) := x; print a, " ", b, "\n"; }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2612.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
127
67530f384a1687c74fa73f12832ca2f52892ba629fb96648f6ddc3a17f78c237
// RUN: %testDafnyForEachResolver "%s" trait T { ghost predicate {:opaque} True() { true } } class C extends T {}
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2612b.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
384
7ede0fcf0ab1f662e03b0e384d7f882b0f00195aaa56d7d03f7a2e3022ea3f87
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" trait T { opaque predicate True() { true } } class C extends T {} method TestOpaque(c: C) { assert c.True(); // error: True is opaque and hasn't been revealed } method TestRevealed(c: C) { reveal c.True(); // test that True can be reve...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-262.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
279
c67fab110e421d72974f6dc71e387a0da6ef22b595f5fda22b716b304d309dcf
// NONUNIFORM: https://github.com/dafny-lang/dafny/issues/4119 // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment function tst(x: nat): nat { x + 1 } method Main() { var f := tst; print f, "\n"; print tst, "\n"; }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2640.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
2,774
f518913c2c180fa2b678490d4f08a3f36c4e29e8875d1718875d8b25aed4a097
// RUN: %exits-with 4 %verify --relax-definite-assignment "%s" > "%t" // RUN: %diff "%s.expect" "%t" module {:options "/functionSyntax:4"} CompilableExpressions { predicate P(x: int) method M0(ghost y: int) returns (r: int) requires P(y) { var gg := (var x :| P(x); x) == 0; // error: x might no...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2651.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
197
470d3c873e1b8cf488b8bb62c9927bed1215a999fab7fbeb5472aa36f0c79563
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" method z(x: string, y: string) { var a: string := "abc"; var b: string := x + y; assert a <= x ==> a < b; // SHOULD FAIL }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2657.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
172
1ef4aac6ff6fc17a755be7745ad6489065034b67c36079d1fe23667f6b011afd
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" lemma Lemma(x: int, p: multiset<int>) requires x in p {} method Test() { Lemma(1, multiset{}); }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-267.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,310
bf34d7f0fead73f9a69d17a1f9b73fd66cca42ab90b249b31abb65349f09d03e
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment method Main() { var c := 1; print(c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c + c...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2672-legacy.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,130
6a4eb0d3577fa49db004fef02ca316e7e6e494c4197e9bca018bee8168e10393
// RUN: %testDafnyForEachCompiler "%s" -- --type-system-refresh=false --general-newtypes=false newtype sreal = r: real | r > -4 as real newtype sint = r: int | r > -4 as int newtype ssreal = r: sreal | r > -3 as sreal newtype ssint = r: sint | r > -3 as sint method Print(b: bool, end: string) // Print boole...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2672.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
3,596
9a0a6a3c5008392aeadae26e33d577da8e705986c5df8cfe3fb50086516b2b1e
// RUN: %testDafnyForEachCompiler "%s" newtype sreal = r: real | r > -4 as real newtype sint = r: int | r > -4 as int newtype ssreal = r: sreal | r > -3 as real as sreal newtype ssint = r: sint | r > -3 as sint method Print(b: bool, end: string) // Print boolean `b` as `true` or `false`, then print `end`. ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2690.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
668
323b1408d00f040046c00e4465388ce062a5efa3686541afd8c1cf5badc3a450
// RUN: %dafny -compile:4 -compileTarget:cs "%s" > "%t" // RUN: %dafny -noVerify -compile:4 -compileTarget:js "%s" >> "%t" // RUN: %diff "%s.expect" "%t" method InSeq<T>(ts: seq<T>) returns (f: T --> bool) ensures forall t <- ts :: f.requires(t) { ghost var pre := t => t in ts; f := t requires pre(t) => ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2693.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,987
c3914c7516803bfd000936897efc2c165832b84792c68bfaa2225f7461c2460d
// RUN: %exits-with 4 %verify --relax-definite-assignment "%s" > "%t" // RUN: %diff "%s.expect" "%t" module A { method Test() returns (result: Result) ensures result.Bad? ==> result.c.IsFailure() { var c := new EvenGood_OddBad; c.a := 0; var x :- IncreaseAndReturn(c); // error: postconditi...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2703.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
445
4822934e53b7bab9453a6af8a5e6325f6643e6893ce95d9456b3359dd83cd762
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" abstract module StillAsby { import A : Absy } abstract module Absy { method Foo() ensures 2 / 0 == 1 { var x := 1; } } abstract module Absy2 { ghost function f(): int { 0 / 0 } } abstract module StillAsby2 refines Absy2 ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2708.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
373
20359f7692ab9a9160120aae5c34a829099505e6842edb4adc0265c40f7b590a
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" method Main() { Sequences(); Arrays(); print "that's all, folks!\n"; } method Sequences() { var a1 := [42]; var a2 := [42]; assert a1 == a2; expect a1 == a2; } method Arrays() { var a1 := new int[] [42]; var a2 := new int...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2719.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
89
9b327acc88a637fb21afbab8123827e2978d962e1737741704f3c0e5af0de1b5
// RUN: %exits-with 1 %baredafny foobar.dll "%s" > "%t" // RUN: %diff "%s.expect" "%t"
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2726.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
311
fcb4b2f7d22e9b72a7a58824caac8622ed2056487edb4d9c00cb74340b3c258a
// RUN: %build "%s" > "%t" // RUN: %diff "%s.expect" "%t" datatype Formula = | And(left: Formula, right: Formula) | Not(underlying: Formula) | True { function size(): nat { match this case And(l, r) => l.size() + r.size() case Not(u) => u.size() + 1 case True => 1 } }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2726a.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
590
cb6e911e00c7a4a015836266bb803d059160516c4c08219fdf4cf8103dfce2b5
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment const digits := ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] function IntToString(i: int): string decreases i < 0, if i<0 then -i else i { if i < 0 then ("-" + IntToString(-i)) else if i < 10 then digits...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2733.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
186
e4f3a4c49bd52587af7887980e396f817ef376ef48229bc1667322c3afe1f275
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment method Main() { print "XYZ"; // Checks that no extra newline is added to the output }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-274.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
159
17db5d9aa8a069ad37a8eaf02ce3eddfde69f22274eeaf9f5269e6981d17a291
// RUN: %testDafnyForEachResolver "%s" module P { type M } module N2 { import opened M = P trait T extends object { var m: M.M } }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2747.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
221
a6cfa90c9f4447bde3b2ad63286045a4582d834da32db32b51787244d310a955
// RUN: %testDafnyForEachResolver "%s" -- --allow-warnings ghost function AnotherBrokenFunction(): nat { var y := 0; assert true by { if case x: bool :| true => assert true || x; } 0 }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2748.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
505
264f8000f9b54b4d8f7279f3ad5dc3322b25cf9e8c90f337700661f8f5184e8d
// RUN: %verify --type-system-refresh=false --general-newtypes=false "%s" > "%t" // RUN: %diff "%s.expect" "%t" function f(x: int): int { 10 - x * x } function BindingGuardTestStmt(): int { var x: nat := 1; assert true by { if i :| 0 <= i < 10 && (f(i) == f(i+1) || f(i) == f(i+2)) { } } 2 ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2752.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
390
99125a20c86d9098d4536044f9fe1cd6fbce5ab76fb3c785dfc3a2388906499a
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" type Empty = x: object | false witness * type EmptyQ = x: object? | false witness * type EmptyInt = x: int | false witness * const x := null as Empty // Error const xq := null as EmptyQ // Error const i := 0 as EmptyInt // Error type foo = x: obje...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-276.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,309
0a08d44df7538c63dbc5233d4f4e608b48261f2febf64bc1e68643bda51162e2
// RUN: %exits-with 4 %verify --show-hints "%s" > "%t" // RUN: %diff "%s.expect" "%t" module Main { const BIG := 16*4*(-2+8-2)*10 const BYTE_MAX := 16*4*(-2+8-2) newtype byte = x | 0 <= x < BYTE_MAX*2/2 newtype b0 = x | 0 <= x < BIG newtype b1 = x | 0 <= x < 11/2 newtype b2 = x | 0 <= x < 100%15 ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-276a.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
2,830
d7b2539511c0eb449ee7199a04c0b646e20447a270bb87563f4db4ccf575e4b4
// RUN: %exits-with 4 %verify --show-hints "%s" > "%t" // RUN: %diff "%s.expect" "%t" module Main { newtype b1 = x | 0 <= x < 3/(2-2) newtype b2 = x | 0 <= x < 3%(2-2) newtype b3 = x | 0 <= x < (3.0/(2.0-2.0)) as int newtype b4 = x | 0 <= x < 1.5 as int newtype b5 = x | 0 <= x < 1000.0 as int as bv8 ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-276b.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
764
746881e2537f3941e430858e8b2db73dc18e5d283696db768b167d6eb198ced0
// RUN: %verify --show-hints "%s" > "%t" // RUN: %diff "%s.expect" "%t" // Testing constant folding of bool operations module Main { newtype b0 = x | 0 <= x < (if true then 30 else 40) newtype b1 = x | 0 <= x < (if false then 30 else 40) newtype b2 = x | 0 <= x < (if true && false then 30 else 40) newt...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-276c.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,153
98dde04ac7cba33b103a20103ba752c60313d8dfbffb885c4bdfa4a15681f729
// RUN: %verify --show-hints "%s" > "%t" // RUN: %diff "%s.expect" "%t" // Testing constant folding of char, string operations module Main { const s := "abcde" const c := s[4] newtype b0 = x | 0 <= x < |s+s| newtype b1 = x | 0 <= x < c as int newtype b2 = x | 0 <= x < c as int as bv8 as int newty...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-276r.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,087
0d3cdd78d6cd5c324baaac7402f0e2d67c73857bd97eec3cab7e25193e28ffe1
// RUN: %verify --show-hints --type-system-refresh=false --general-newtypes=false "%s" > "%t" // RUN: %diff "%s.expect" "%t" // Testing constant folding of real operations module Main { newtype b0 = x | 0 <= x < (2.0+3.0) as int newtype b1 = x | 0 <= x < (3.0-2.0) as int newtype b2 = x | 0 <= x < (3.0*2.0...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-276v.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,028
c429fb64c3610adc1fabfb25ced6abe25e34de49d8af62553a9beb8445956164
// RUN: %verify --show-hints "%s" > "%t" // RUN: %diff "%s.expect" "%t" // Testing constant folding of bit-vector operations module Main { const a: bv8 := 20 const b: bv8 := 37 newtype b0 = x | 0 <= x < (a+b) as int newtype b1 = x | 0 <= x < (a-b) as int newtype b2 = x | 0 <= x < (a*b) as int new...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-277.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
170
6188faed0f51af5f3d78298770a93bdec4a96ddc4e36449166105ba184e7a6d8
// RUN: %exits-with 2 %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" method M(a: array<int>) { assert a[..true] == a[true..]; // error (x2): incorrect type }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2792.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
507
ee6c358aa07e0b07dbff997a2ae5decc27d4b674b3f5123691d223d7b839210d
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment datatype Wrapper<T> = Wrapper(s: seq<T>) { static function empty(): Wrapper<T> { Wrapper([]) } } datatype Wrapper2<T> = Wrapper2(s: seq<T>, t: T) { static function empty(t: T): Wrapper2<T> { Wrapper2(...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2813.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
276
d5095e760abfeee9af13bf91a35c2a6705ebc035259ea600791185336db446f9
// RUN: %dafny /version > %t // RUN: %OutputCheck --file-to-check "%t" "%s" // Just make sure the version string is present and not a default like 0.0.0 or 1.0.0. // This will have to be changed with each major version but I can live with that :) // CHECK: dafny 4\..*
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2828.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
112
45ae763b188ad06f50e469cf73d9ad707ce4cf8fdd1cbdfe2d32001af6292c93
// RUN: %exits-with 2 %build "%s" > "%t" // RUN: %diff "%s.expect" "%t" method M() { assert arr[0]; }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2829.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,869
8c142db26362f007a99436dcf917b080dac024ce7dd6c5fd5323ddf86290e18f
// RUN: %exits-with 2 %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" datatype Either<+L, +R> = Left(l: L) | Right(r: R) datatype Lang<!A> = Lang(mem: (string, A) -> bool, repr: iset<A>) ghost function Atom<A>(s: string, value: A): Lang<A> { Lang((input, a) => s == input && a == value, iset{}) } gho...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2829b.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
604
52e0bab632d3f312ead0cb247712ba195abb9603e01fee3b0948a6e741748be8
// RUN: %verify --relax-definite-assignment "%s" > "%t" // RUN: %diff "%s.expect" "%t" type IntSeq = seq<int> method Test0() { var a; var b := [a]; var s: IntSeq := a; } type BoolSet = set<bool> method Test1() { var a; var b := {a}; var s: BoolSet := a; } method RepeatAux() { var a...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-283.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
3,268
63c64f553d6715848758f77869c14ed8c8749d72942973aff72eb97519db1b8e
// RUN: %testDafnyForEachCompiler "%s" -- --relax-definite-assignment datatype Result<T> = | Success(value: T) | Failure(error: string) datatype C = C1 | C2(x: int) trait Foo { method FooMethod1(r: Result<()>) ensures match r { case Success(()) => true // OK case Failure...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2830.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
309
e36daeba0f3371d0dacdaeb965b2c649417423eeebe7e8afd799aac1513e7fe0
// RUN: %exits-with 2 %resolve --function-syntax:4 "%s" > "%t" // RUN: %diff "%s.expect" "%t" // The issue here is whether the error message location is at the method keyword or, badly, at the end of the body function method f(): bool { true } predicate method p() { true }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-283a.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
3,672
58b4744a076efe2e0a3a43a976781dd0030a127c9bdeadc90acc92703d51c331
// RUN: %exits-with 2 %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" datatype Result<T> = | Success(value: T) | Failure(error: string) datatype C = C1 | C2(x: int) trait Foo { method FooMethod() returns (r: Result<string>) ensures match r { case Success(()) => true // ERROR...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-283b.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
607
ab1f0d24e9ca38a6f108e3c1ff0c51b90b59558cd541f84de8bb1b37065dc573
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" datatype Result<T> = | Success(value: T) | Failure(error: string) datatype C = C1 | C2(x: int) trait Foo { method FooMethod4() returns (r: Result<C>) ensures match r { // ERROR - missing case case Success(C1()) => tru...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-283c.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
716
871bac90ea9af022ed2e7e70e925cdcbd6920d2249ba9b204830881d3ff2bf54
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" datatype Result<T> = | Success(value: T) | Failure(error: string) datatype Bar = C1() | C2(bl: string) const X: int := 42 const SS: string := "asd" trait Foo { static const S: string := "asd" method FooMethod2() returns (r: Result...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-283d.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,169
fb9c25afb45d3e8e5358af3fe08b2ed22816e2c381706449cce8263261bd6f98
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment datatype Foo = R(v: int) method m(f: Foo) returns (x: int) { x := 0; match f { case R(0) => x := 1; case R(1) => x := 2; case R(y) => x := -y; } assert f.v == 0 ==> x == 1; assert f.v == 1 ==>...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-283e.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
428
18a9a0444caa7529bfdd820abd0f69552f2ef6a497447767c259496705e10bc2
// RUN: %exits-with 2 %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" datatype Foo = R(v: int) const ZERO := 0 const ONE := ZERO+1 method m2(f: Foo) { var x: int := 0; match f { case R(ZERO) => x := 1; case R(ONE) => x := 2; // ERROR - ONE not a literal case R(y) => x := -y; } a...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-283f.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
582
c67af5c250648dd7f4cbf135fe057d7e68be975873492ee6e904cbf959a045a0
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" datatype D = Nil | MM | D(x: int, tail: D) method M1() { var D(a,b) := D(1, D(2, Nil)); //OK assert a == 1; assert b == D(2,Nil); expect a == 1; expect b == D(2,Nil); } method M4() { var D(c, Nil) := D(1, Nil); // OK assert c == 1; ass...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-283g.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
5,164
121f690a30919bee5aa9e441da983b769064e50c35133a31ae1632823ace1f0b
// RUN: %exits-with 2 %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" module Main { datatype Result<T> = | Success(value: T) | Failure(error: string) datatype Bar = C1() | C2(bl: string) const X: int := 42 const SS: string := "asd" trait Foo { static const S: string := "asd...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2843.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,480
88f41c86fe14cee338b6c843ab3c6bbf854371004e8d6b69d0a362cb47dfa8a8
// RUN: %exits-with 2 %dafny /functionSyntax:4 "%s" > "%t" // RUN: %diff "%s.expect" "%t" function F(ghost x: int, y: int): int { y } ghost function G(x: int, y: int): int { y } method M0() { var f: (int, int) -> int; f := F; // error: the expression `F` is ghost, since function F has a ghost pa...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2852.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
515
7e217c9c4863c090329919ef5a15a3e8cc309973fc75491f1589398d249cdf84
// NONUNIFORM: regression test // RUN: %run --target cs "%s" > "%t" // RUN: %run --no-verify --target js "%s" >> "%t" // RUN: %diff "%s.expect" "%t" // Returns a function that computes the sum of n consecutive integers starting at pos function Sum( ghost remaining: nat, n: nat ): (p: nat -> nat) decrea...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-286.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
323
864cd24eb0dc3b9f3b4022762ca2682a7359c31824a09a8e318ea3af3c10a216
// RUN: %testDafnyForEachResolver "%s" datatype Option<T> = None | Some(t:T) class C { method m(x: Option<bool>) { var a := match x { case Some(true) => false case _ => true }; } } class D<T> { method mm(x: Option<int>) { var b := match x { case Some(5) => false case _ => true }; } } ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2878.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
132
fef68c26fb5303f05c12c6099ce80ac24b3b0ea53e04db3bf663ef1850051baa
// RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s" method test() returns (a: bool, b: int) { return (true, 0); }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-288.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
139
b1507617a0fc2770a6c08ecc0105ee68d62112d46e14917a448fb4bc078d1624
// RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s" module A { type T = int } module B refines A { type T = int }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2883.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
527
a59b723945f283e220b8f7e2cdd6beae887db9dafdd2e897f9b76881649a9a36
// RUN: %testDafnyForEachResolver "%s" type MyArray = array<int> type MyMatrix = m: array2<int> | m.Length0 == m.Length1 witness * class State { var arr: MyArray var m: MyMatrix var count: nat constructor () { arr, m := new int[100], new int[100, 100]; } method Process(i: nat) ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2885.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
194
53f28683c105b0a746e14a8b18eaa6f6d579b036f6e033a85139fc7241c472a3
// RUN: %build "%s" > "%t" // RUN: %diff "%s.expect" "%t" datatype KeyValues<T> = Store(underlying: map<string, T> := map[]) function CreateStore<T>(): (r: KeyValues<T>) { Store() }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-289.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
331
66ebd9c7fcac0169665eba7d4a38ca4ff95ee5ffc66c00e7d5cf91160a0ea24b
// RUN: %baredafny build %args "%s" > "%t" // RUN: %baredafny build %args "%s" --verbose=true %S/"git-issue-289b.dfy" >> "%t" // RUN: %baredafny build %args %S/"git-issue-289b.dfy" >> "%t" // RUN: %diff "%s.expect" "%t" include "git-issue-...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-289b.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
494
cdf21394f3a7d8c1df91358ed6da80baca889fbb2fbc7bc850b3edb482fbf07a
// RUN: echo "" // This is just an auxiliary file, with no tests by itself abstract module Foo { type Value datatype Message = | M(value: Value) lemma someLemma(a: Message, b: Message, c: Message) { match (a, b, c) { case (M(x), M(y), M(z)) => { } } } } module ByteDefini...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2903.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
286
00958f5e33476390e5738b30d6ec442f41f8dfd22ee5b8d12b1ca6a98c7db7ed
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" module A { datatype Wrapper = Wrap(val: int) } module B { datatype Wrapper = Wrap } module Main { import opened A import B method Main() { var Wrap(x) := Wrap(0); expect x == 0; } }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2920.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
157
74dbf0c5b933d7e5c5f2affc4ecc1d24aba1141a624250a66762ebe24b1816ad
// RUN: %testDafnyForEachResolver "%s" datatype D = D(x: int) ghost function Foo(): () ensures assert true by { var D(x) := D(0); } true { () }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2927.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,131
9a0b89d8db811faaf24bcd25e7ff17c03a0f7e7f87a29fc4ba24b0a545a0ec24
// RUN: %testDafnyForEachResolver "%s" include "BoundedInts.dfy" module {:options "-functionSyntax:4"} DafnyNaCl { import opened BoundedInts // M2256 = 2**256 const M2256 := 0x1_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000_0000 // P = 2**255 - 19 const P := 0x80...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2947.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,039
ca514b046f2eaebdce632d5a263f577b16bb54a8d0a77a91fe1c4b4fc430781e
// RUN: %testDafnyForEachResolver "%s" codatatype Stream<X> = Nil | Cons(head: X, tail: Stream<X>) least predicate Finite<Y>(s: Stream<Y>) { // The following once generated malformed Boogie, because of a missing // type substitution in the datatype value Nil s == Nil || Finite(s.tail) } least predi...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2956a.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
246
b2bdaac2a56d9e9dab47dae65ba0e92dcd456cb91d290946a1ab9bdeb53255a2
// RUN: %baredafny run --target=js "%s" --input "%S/git-issue-2956b.js" > "%t" // RUN: %diff "%s.expect" "%t" method {:extern "global", "OneOne"} OneOne() returns (s: seq<int>) method Main() { var s := OneOne(); expect s == [1]; }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2959.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
300
b7ad2a51155fe0ea1f87b21a46b3abbb41bb99f4206bb8905b49db9c3e351f68
// RUN: ! %baredafny resolve --show-snippets:false --use-basename-for-filename --enforce-determinism "%s" > "%t" // RUN: %diff "%s.expect" "%t" method NondetIf() returns (x: int) { if * { x := 0; } else { x := 1; } } method NondetAssign() returns (x: int) { x := *; }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2959a.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
451
4366b9d8ece6c3a96ec134f8c100acdfe54dfc58a1825fa25fb8255962a46119
// RUN: %exits-with 4 %baredafny build --show-snippets:false --use-basename-for-filename --enforce-determinism "%s" > "%t" // RUN: %diff "%s.expect" "%t" method AlsoNondetIf() returns (x: int) { var b: bool; if b { x := 0; } else { x := 1; } } method AlsoNondetAssignButAccepted() returns (...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2959b.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
583
e7c85d5c874be49ed9ec4e931c10abe947454648a530e60e1178eee21702f0a9
// RUN: %exits-with 4 %baredafny build --show-snippets:false --use-basename-for-filename "%s" > "%t" // RUN: %diff "%s.expect" "%t" method NondetIf() returns (x: int) { if * { x := 0; } else { x := 1; } } method AlsoNondetIf() returns (x: int) { var b: bool; if b { x := 0; } els...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3059.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
2,199
d1ab8b92b10b9f2e2a69aed1da59a06a637c32eaa6fd344fe9967ded91230f1e
// RUN: %exits-with 4 %verify --relax-definite-assignment "%s" > "%t" // RUN: %diff "%s.expect" "%t" type seq0 = s: seq<int> | forall n <- s :: n == 0 ghost function ReplaceInSeq0_Rejects(s: seq0): seq0 requires |s| > 0 ensures false { var s' := s[0 := 1]; assert s'[0] != 0; s' // error: s' does ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3095.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
4,267
b65edd1cc569d02f777065de896be20bfd8dcb06c40375b13c1bdab96bb05799
// RUN: %exits-with 4 %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" opaque function HasPrecondition(i: int): int requires i >= 2 { i } method TestOnly(i: int, k: int, o1: set<object>, o2: set<object>) returns (j :int) requires i >= k modifies o1 ensures j > 1 // Unchecked (postconditions ar...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3125.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
281
9bbb844a4cf7d0f24da9b5f47fd1a2d31503d69a079b3f83295533c2ada4f951
// RUN: %exits-with 2 %verify --type-system-refresh=false --general-newtypes=false "%s" > "%t" // RUN: %diff "%s.expect" "%t" method Foo() returns (i: int) { i := "explicit assignment"; return "implicit assignment"; } ghost function foo(): int { "hello" }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-314.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
424
eed13df2c3329f7d0ee8ccfc851846988dee2c3798416f4935bafbe0c45673a9
// RUN: %testDafnyForEachCompiler "%s" -- --type-system-refresh=false --general-newtypes=false --relax-definite-assignment datatype S = S(G: array<int>) datatype T = T(F: array<S>, ghost Repr: set<object>) ghost predicate Valid(t: T) reads t.F reads (set i | 0 <= i < t.F.Length :: t.F[i].G) { var short...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3187.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
218
fbd89bdf11fc5e0fb340b0f9065e7295cf953686f95c2bfe408eb6f0ed8a67e2
// RUN: %exits-with 2 %run "%s" > "%t" // RUN: %diff "%s.expect" "%t" module M { const a: int const b: int export Z reveals a, provides b } module P { const c = 5 class C { var x = 5 } }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3187a.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
174
35e8053076804dd30f74ed6a33011dedf5791f9cb5fcd3fb57ff596f7f316c16
// RUN: %exits-with 2 %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" module P { const c = 5 method m() { var x = 5; var z := (var y = 5; y); } }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3187b.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
126
c3962125703ac181ac26bddcfe2f03a7e017c0c3825b3ef0f0615d79a0aa794e
// RUN: %exits-with 2 %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" module P { class A { var x := 5 } }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3187c.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
130
82f0eae10a2e050798396a363fc834b828370648eec91f8d03e6d0bac43a5032
// RUN: %exits-with 2 %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" module P { class B { var z: int = 5 } }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3187d.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
193
cb06ed3a9a6ca3c3a150fde1a771a8d17e8715c98e8aa4ad3d641f003c7f1a52
// RUN: %exits-with 2 %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" module P { class B { var z: int = 5 } class C { var s } class D { var t := 6 } }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-321.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
808
cb97ebe57ab03f3654fb658fa29e633f30fb6c72e0660c7c1b5c5c236c4ed38a
// RUN: %testDafnyForEachResolver --expect-exit-code=2 --refresh-exit-code=4 "%s" method h(n: nat) { var a: array<nat> := new [n](i => i); // OK, element type inferred as "nat" (in legacy resolver, i is nat, which gives gives RHS as nat) } method k(n: nat) { var a: array := new [n]((i: nat) => i as nat);...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-321a.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
239
3a0528009524ee207e207f05d35a3dc0cf5dd6e9faf153505de909b0b17a845d
// RUN: %testDafnyForEachResolver "%s" type lowercase = ch | 'a' <= ch <= 'z' witness 'd' method InitTests() { var aa := new lowercase[3]; var s := "hello"; aa := new lowercase[|s|](i requires 0 <= i < |s| => s[i]); }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3221.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
599
f3130488b425bbadd6f4a067c8c8c363e9a43d309ba0a109df299c6b2c2cc98c
// RUN: %baredafny test "%s" > "%t" // RUN: %baredafny test --methods-to-test='q' "%s" >> "%t" // RUN: %baredafny test --methods-to-test='m' "%s" >> "%t" // RUN: %baredafny test --methods-to-test='M.*' "%s" >> "%t" // RUN: %baredafny test --methods-to-test='^.$' "%s" >> "%t" // RUN: %diff "%s.expect" "%t" metho...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-324.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
432
26ce21139b86652d8a7f1fa06a661f8c407187913a8cbd889ca8e9b559888a7b
// RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s" abstract module Sig { class Foo { const v: int constructor () {} method hi() } } module Impl1 refines Sig { class Foo { const v := 42 constructor () {} method hi() { print "Hello!\n"; } } } mod...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3243.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
595
b46c30aa99661adc26eb5d2cfa60dfdabab837e38f62428c82d67f9caa5cb23e
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" method LoopWithBody(x: int) decreases * { var i := 0; while i < x // The following loop-invariant-on-entry check was once omitted when it was the only proof obligation. invariant i <= x // error: loop invariant does not hold on entry ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-326.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
688
f4b491d0adf55f4ed2691e9174ea688d65c40ec819a80773686469b52fc1a1ac
// RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" method test1() { var s := [1, 2, 3]; var a := s[..]; // OK var b := s[0..2]; // OK var c := s[1..3]; // OK var d := s[1..1]; // OK } method test2() { var s := [1, 2, 3]; var a := s[-1..]; // ERROR } method test3() { ...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3267.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
829
ac1658292584a461a3c50dd7fa076ffc40c1d62cdb31f31c074eb026afe3773d
// RUN: %exits-with 1 %baredafny zzzz "%s" > "%t" // RUN: %exits-with 1 %baredafny -zzzz "%s" >> "%t" // RUN: %exits-with 1 %baredafny test.d "%s" >> "%t" // RUN: %exits-with 1 %baredafny resolve --use-basename-for-filename --zzzz "%s" >> "%t" // RUN: %exits-with 1 %baredafny resolve --use-basename-for-filename tes...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-327.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
833
c856b3593ef8c0298a2d98d9fde5361888f57f14e9c756920828199519aadea9
// RUN: %testDafnyForEachResolver "%s" module A { module AA { module AAA { const aaa := 50 } } const a := 51 } module B { import A } module C0 {} module C refines C0 { import B } module CC refines C {} module D refines CC { import A = B.A } module E { imp...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3273.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,586
65c08c1b7420f83136a646c218d4b63cc5c34f1fbd25207e594b2cd047577a41
// RUN: %exits-with 2 %build "%s" > "%t" // RUN: %diff "%s.expect" "%t" iterator Iter<Y>(u: set<Y>) // this infers Y to be (==) method Repro<K>() { var iter: Iter<K>; // error: K is not (==) } iterator IterA<X(==)>() // this declares X to be (==) iterator IterB<Y>(u: set<Y>) // this infers Y to be (==)...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-327a.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
146
84229ba337572b078994eb63250d48d312d4a382056c0a1f54ed7ca8af319932
// RUN: %testDafnyForEachResolver "%s" module A { module X { } } module B { import A.X // used to require an 'import A' first }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-327cir.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
146
56d1df0c7f6ce3a71d93bdc7749ccdac9ac00dc4c84f65e3566f2370d647a1b6
// RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s" module A { module B { module C { import A.B } } }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-327cir1.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
140
93f214d5f1381c8c8c0d04d362e770e2a9f399b0025839bb4f001f38ffea52d2
// RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s" module A { module B { module C { } } import B }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-327cir2.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
144
cf09aea282c5da4811ef53504111322d7e507f8dea36d4034f20fb6322ae541c
// RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s" // Error - circular module D { import E } module E { import D }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-327cir3.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
164
770d1c67efe6ecf5b51e223e3d73092de2400c630a5d19c8ee19f3dafc929b37
// RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s" module A { // error: cyclic import import B module X { } } module B { import A.X }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-327cir4.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
136
005944ab39adffff10c8cc5650e4ce99339a68853a5a439160f1d2a2010ea1e5
// RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s" // Error - circular module D { module E { import D } }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-327err.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
599
3bb8064e05bf8ed35d8791e7fd46f3b7eaf0875e86a544707dcad8a0093a519c
// RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s" module A { module AA { module AAA { } } } module B { import A } module C0 {} module C refines C0 { import B } module CC refines C {} module D refines CC { import A = B.A } module E { import S = A.X // erro...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-328.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
704
3b85d9d74db0e1a926e2c494d75253b255ba8f7a5741a8a2313b89af25a5c5ab
// RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s" module Z { datatype T = T(i: int) type X ghost function z(): int { 0 } const c := 10 } module B { import A = Z type T = A.T type K } module C { import A = Z type T = A.T type K type X = A.X } module D { impo...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3288a.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
363
daa98a4e161e4acda771cc5e24e4e99b8bd2b1a3e7cf2af8d512428269e23b74
// RUN: %verify "%s" > "%t" // RUN: %diff "%s.expect" "%t" // Check that contextual keywords can be used as identifiers const least := 0 const greatest := 42 const to := true const downto := false const older := 0.0 module M { function least(): int { 42 } method greatest() {} type to predicat...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3288b.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
277
65339dc450e059e05ff7d20d48cc0132b6fcee0cf2af41c58d652e861bd81ef1
// RUN: %exits-with 2 %baredafny verify --show-snippets:false --use-basename-for-filename "%s" > "%t" // RUN: %diff "%s.expect" "%t" module M { export least predicate p[nat]() { true } // error - the 'least' goes with export so the [nat] is illegal for a predicate }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3288c.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
258
272b5067c4560fb5b251107cbf15720d3eab358de684af073c076cc5073ee585
// RUN: %verify "%s" --allow-warnings > "%t" // RUN: %diff "%s.expect" "%t" module M { export greatest predicate p() { true } // Warning: the greatest goes with the export } module N { export least predicate p() { true } // OK }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3294.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
242
62ae5e17d197650d0a59baa24b25dd0825d06c2ca84a59bfea65cb386d7a7781
// RUN: %exits-with 2 %verify --library "%s" "%s" > "%t" // RUN: %diff "%s.expect" "%t" datatype FailureRestrictedType<T, R> = Failure method m() returns (r: FailureRestrictedType<bool, bool>) { :- Failure; r := Failure; }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-330.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
894
3ba4f6533992a70a3a34f14f4d8281899d76afb6cfed1b697e1a7e4767b85d9e
// RUN: %testDafnyForEachResolver "%s" datatype Option<A> = Some(value: A) | None datatype T<A> = T(value: Option<A>) ghost function f(t: T<int>) : T<int> { match t.value { case Some(val) => T(Some(val)) case None => T(None) } } ghost function fok(t: T<int>) : T<int> { match t.val...
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3304.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
224
70ccded4885466ca8aaebc7d2e4cd959fc9d8450ce6925c91c60f78cd27b85f0
// RUN: %exits-with 2 %baredafny resolve --use-basename-for-filename --show-snippets --type-system-refresh=false --general-newtypes=false "%s" > "%t" // RUN: %diff "%s.expect" "%t" method M() { assert [] == [[]]; }
dafny-lang/dafny
Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3304b.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
165
d097526bb17ad51f3346c3591e2a8e22215b98ce1935e54ba58012e67429057f
// RUN: %exits-with 4 %baredafny verify --use-basename-for-filename --show-snippets "%s" > "%t" // RUN: %diff "%s.expect" "%t" method m() { assert false; }