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-5972.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 5,880 | a59d858dc17cb4e97093b19f20d476daad9fadff3521a9c50cff74967f4a4f4c | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
module Issue5972 {
datatype M<T, U> = M(m: map<T, U>)
method CompareAnything<A>(f: A, g: A) returns (b: bool)
ensures b <==> f == g
{
var m1 := M(map[0 := f]);
var m2 := M(map[0 := g]);
assert m1 == m2 <==> f == g by {
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-5972a.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,152 | 424aed6c21eea3e23b2368f8d217c90f0760de7e3f147d8e455f6cfd51124cd7 | // RUN: %exits-with 2 %verify --type-system-refresh --general-newtypes "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// This module is like SubsetTypes in git-issue-5972.dfy, but uses newtypes around the map/seq types
module Newtypes {
newtype MyMap<T, U> = map<T, U>
newtype MySeq<T> = seq<T>
datatype M<T,... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-5972c.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 335 | d833d1ea8a4fc446655f74a3b91455542fb86b1b996ed0f6110c97f01a4c7f6d | // RUN: %exits-with 2 %baredafny verify %args --type-system-refresh --general-newtypes "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
newtype FunMap<T> = s: map<int, int -> T> | true {}
datatype A<T> = A(a: FunMap<T>)
method Test<T(==)>() {
}
method Main() {
Test<A<int>>(); // Error: A<int> does not supp... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-600.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 404 | 94ceb962a561bffeb7f4b1dab3a5529e7f386fcd47fb6e6ec5fc3693d85dbd6a | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
datatype D = D(n: int)
ghost function f(s: seq<int>): int
requires |s| != 0
ensures f(s) in s
{
s[0]
}
ghost predicate vacuous_fact(ds: seq<D>, s: seq<int>)
{
0 in s && |s| == 0 ==> ds[f(s)].n == 0
}
lemma False()
ensures false... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6014.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,302 | 541785f4b3f1fef59a8817e29b2aa18d71e58414ea933dd60d55646474a2328a | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s"
// Extra check for the C# compiler with the --compile-suffix option.
// RUN: %baredafny build -t:cs --compile-suffix "%s"
// RUN: %OutputCheck --file-to-check "%S/git-issue-6014.cs" "%s"
// Just to make sure that if we use --compile-suffix, we don't do th... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6038.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 339 | 0d4bc6c03ec65d53df2792006fad8ba568b8a1c1bfa1682401d0792611ad5fa6 | // RUN: %verify %s &> "%t"
// RUN: %diff "%s.expect" "%t"
trait T {
ghost function Modifies(): set<object>
method Foo()
modifies Modifies()
}
class {:compile false} C extends T {
const Repr: set<object>
ghost function Modifies(): set<object> {
Repr
}
method Foo()
modif... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-604.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 376 | 728bb1adab4afc54a89937bb9fc0f5f8329d0da2a85187fcc78d2e81aa8df37a | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
method Inv() returns (x: int) {
x := 0;
while x < 100
invariant 0 <= x <= 100
assert x == 25;
return x;
}
method InvB() returns (x: int) {
x := 0;
while x < 100
invariant 0 <= x <= 100
decreases 100 - x
{
x... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6043.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 963 | de7cb21e7505aa60013b8414bd41cf2b2d2133a53190ab26ea4b8a7d73027751 | // RUN: %exits-with 2 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
function F(x: int): int
decreases G(x) // error: decreases clause cannot use mutually recursive function
{
G(x) - 1
}
function G(x: int): int
decreases F(x) // error: decreases clause cannot use mutually recursive function
{
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6090.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,063 | 9ee69d6e59eb34fa258402b1a05f71df1860f0f63af3fee08348ab91b4e88498 | // RUN: %testDafnyForEachResolver "%s"
module Wrappers {
datatype Option<T> = Some(value: T) | None
class Box<T> {
var value: T
constructor(value: T) {
this.value := value;
}
}
}
module A {
import opened Wrappers
function DefaultFooArg(): Option<Box<int>>
method ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-610.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 322 | 4aecafa8693b5a2336a8299ff89f7b025b06ef889c22524eb36704c5ae6bff20 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
type pos = i:int | i > 0 witness 1
method Main()
{
var x:pos;
assert x > 0;
var p:(pos, pos);
var (a, b) := p;
assert a > 0;
assert b > 0;
print a, " ", b, "\n";
expect a > 0;
expect b > 0;
}
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-611.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 309 | c717678abfd65b47ad518397c9d60cbc9e4a00492a1f1e60ffd8c59df0df8d84 | // RUN: %verify --type-system-refresh=false --general-newtypes=false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module M1 {
export reveals *
export Nothing
type T
}
module M2 {
import M1
import Nothing = M1`Nothing
export provides f, Nothing
ghost function f() : M1.T
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-612.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 107 | fb55479c458529cb6a83b4e3924913abc710f5bbd0f40f4c48339b5dc1377e66 | // RUN: %testDafnyForEachResolver "%s"
datatype D = D
{
function {:extern Foo} Foo() : bool
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6120.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 223 | 9debf0db8e14388f9e581a0ee950c419833ec6791f3c25e71308526110feeb2b | // RUN: %testDafnyForEachResolver "%s"
datatype OnOff = On | Off
lemma Test<K>(t: OnOff)
{
match t
case On =>
case Off =>
// The following once caused a crash
forall x: K {:trigger} {
}
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6149.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 257 | 480878af3cd8af25b6977639b9cbc6406c77b755f9d7ef4689c8ff18c1efbf7d | // RUN: %testDafnyForEachCompiler "%s"
predicate TestX(f: char -> bool) {
f('x')
}
predicate TestXOn(obtained: char) {
TestX((c: char) => c == obtained)
}
method Main() {
var c := TestXOn('x');
var d := TestXOn('y');
print c, d;
} |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-615.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 466 | 832528d083e5cbdb02751dddac39a542f6e5ed0b0dea6df8b552e9d53280929a | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
class MyClass {
ghost const repr: object
constructor (ghost r: object) {
repr := r;
}
}
datatype D1 = D1(o: MyClass)
{
ghost const objs: set<object> := getObjs() // Error
ghost function getObjs(): set<object>
reads o
{
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6154a.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 237 | 4fee775ed1da55f78b5ef874e1a90bf4fca3fdfd55c68b61a27a580a1b045f1f | // RUN: %testDafnyForEachResolver "%s"
datatype List<X> = Nil | Cons(head: X, tail: List<X>)
lemma Test<X, Y>(xs: List<X>, y: Y) {
// the > in the following line once used to crash the resolver
assert y < xs <==> xs > y;
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6154b.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 367 | 8a30c23234bbd44594352ca691afaa44ca9e09ab569753ddda869285871eaedc | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
codatatype IList<X> = Nil | ICons(head: X, tail: IList<X>)
lemma ITest<X, Y>(xs: IList<X>, y: Y) {
var b0 := y < xs; // error: < expects one operand to be an inductive datatype, not a codatatype
var b1 := xs > y; // error: > expects one operand to ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-616.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 273 | 81290af02d0b22c8b2eb9bd40b2fad9ba8b52e25433fd2fbabbb868653ac3482 | // RUN: %testDafnyForEachResolver "%s"
module TestBad2 {
export Abs provides D1, D1.constTest
datatype D1<T> = D1(o : T)
{
const constTest := true
}
}
module TestBad3 {
import TestBad2`Abs
method test(qa : TestBad2.D1<int>) {}
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6164.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,462 | 4051abf2823129e8805fef2d0fa67588288f16622c223c3148d559d1c3d2ba52 | // RUN: %exits-with 4 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module Example0 {
datatype Wrapper = Wrapper(obj: Node)
class Node {
var next: Node?
ghost var wrappers: set<Wrapper>
function Wrap(): Wrapper {
Wrapper(this)
}
constructor() ensures this.wrappers ==... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-621.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 352 | 7fb3e9247a6cc183297a13572b3b2b2317444b8468cd840c255eaa391a2d9ba1 | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
module M {
export provides D, MyData
datatype D = D1 | D2
const MyData : D := D1 // OK even though in the export view, MyData does not have an initializer
}
module M1 {
import M
const MyData : M.D // Error - no initializer since M1 do... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6210.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 504 | 3d7c227c663731a4ab26650752ec6ff048bb7542f67b67547c59b7655b7edc1f | // NONUNIFORM: Testing the initialization of Rust, not relevant to other backends.
// RUN: %baredafny build -t:rs %args --enforce-determinism "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module Test {
datatype StringWrapped = String(s: string)
method StringWrap(name : string) returns (output : StringWrapped... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6212.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 359 | 91894c9d8f9f4ff57a09eb9b18461581954001efe0b23ade8e98f297638856df | // NONUNIFORM: Testing that we don't need --emit-uncompilable-code.
// RUN: %baredafny build -t:rs %args --enforce-determinism "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module Test {
function FindB(): set<string>
{
var elems := ["a", "a", "b"];
var elemsSet := set id <- elems;
set x | x in e... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-621a.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 215 | a8df99622fcbbcbde68e93116c748f9cbe59436e4f4e0952c7333810388b81c8 | // RUN: %testDafnyForEachResolver "%s"
module M {
export provides D, MyData
datatype D = D1 | D2
const MyData : D := D1 // OK even though in the export view, MyData does not have an initializer
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-622$f.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 135 | 5f9a356fdb05c7a3e5fb7403ef3d4e1e01f3179688d4bf387af688e667e8596a | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment --spill-translation
method Main() {
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-623.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,054 | 867a49f761c793bc1c4012fa664330f68d17ddc825d9ee4ddf090c2edc5aca83 | // RUN: %exits-with 4 %verify --type-system-refresh=false --general-newtypes=false --general-traits=legacy "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// NOTE: This test fails with the new resolver and general traits, because of how it infers types in the Library modules. This should be fixed.
// ----- example report... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6250.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 215 | 63cd0ddaf2a55370cb92ab08c82f7bddb7cdd02b83f9cc80ebbce05d42a698c4 | // RUN: %testDafnyForEachResolver "%s" --expect-exit-code=2
class Stack<T(0)> {
}
class Stack<T(0)> {
ghost var s: seq<T>
method Pop() returns (v: T)
ensures v == old(s[0]) && s == old(s[1..])
} |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6317a.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 727 | c16285f21031bed1ae643aea6a0f8a9798d0278cdf5341a019fdf676efaf2101 | // RUN: %exits-with 2 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// This file contains variations of types (D1 and D2) having several common supertypes. This had
// once caused various crashes in the resolver.
trait TBase {}
trait TT {}
datatype D1 extends TBase, TT = D1
datatype D2 extends TBase, TT... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6317b.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,053 | 2ad0e38499475339107123736d58be16c41e505672fbe4d6273d9cd52891967f | // RUN: %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// This file contains variations of types (D1 and D2) having several common supertypes. This had
// once caused various crashes in the resolver.
trait TBase {}
trait TT {}
datatype D1 extends TBase, TT = D1
datatype D2 extends TBase, TT = D2
type SS... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6329.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 119 | f3b96c5220dbec74461ab2333c585bbf68988928f9f37b3ade937c17075b0432 | // RUN: %exits-with 2 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
method Test() {
var x: seq<field>;
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-633.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 618 | 357585a380b0998b72739b74419b98c9164aee360a8cc3c55c4a5ba68c929070 | // NONUNIFORM: need to add support for --input when running to %testDafnyForEachCompiler
// RUN: %verify "%s" %S/git-issue-633A.dfy > "%t"
// RUN: %run --no-verify --target cs "%s" --input %S/git-issue-633A.dfy >> "%t"
// RUN: %run --no-verify --target js "%s" --input %S/git-issue-633A.dfy >> "%t"
// RUN: %run --no... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-633A.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 119 | 17b391eb25a6d129b7eeb8ec75d3c9912895db00e51a07625191efe98efa66ef | // RUN: echo ""
// This file is not a test - just a companion file for git-issue-633.dfy
method mm() {
m();
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6366.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,217 | 2641a664350227110db765093987367ee342d0659fb540ddb45a46f179def4b0 | // RUN: %exits-with 4 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
datatype Nat = Nat(n: nat)
datatype SeqNat = Seq(seqn: seq<Nat>) {
predicate LessThan(n: nat)
decreases seqn
{
if seqn == [] then true else seqn[0].n < n && Seq(seqn[1..]).LessThan(n)
}
}
predicate LessThan(ss: seq<Seq... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-6395.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,891 | a6eabdf42ece9ac0ae871363962460a81bc24f15a3dbed30f6fed4c220c34353 | // RUN: %exits-with 4 %verify --general-traits=datatype "%s" > "%t"
// RUN: %exits-with 4 %verify --general-traits=datatype --type-system-refresh "%s" >> "%t"
// RUN: %diff "%s.expect" "%t"
trait Base {
predicate Foo()
decreases this
predicate SomethingElse()
decreases this, 55
{
true
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-643.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 315 | fbc9717cd1acc89cec69a0c781f0673a0d364597147828b7dc66774aa303049e | // RUN: %verify "%s" > "%t"
// RUN: ! %run --no-verify --target cs "%s" >> "%t"
// RUN: ! %run --no-verify --target java "%s" >> "%t"
// RUN: ! %run --no-verify --target js "%s" >> "%t"
// RUN: ! %run --no-verify --target go "%s" >> "%t"
// RUN: %diff "%s.expect" "%t"
method Main() {
expect false;
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-643a.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 324 | 945323aaf8ba7b98a7287ed2cca2383a8a3fa3d9336ef70a1c781b58f5e1046f | // RUN: %verify "%s" > "%t"
// RUN: ! %run --no-verify --target cs "%s" >> "%t"
// RUN: ! %run --no-verify --target java "%s" >> "%t"
// RUN: ! %run --no-verify --target js "%s" >> "%t"
// RUN: ! %run --no-verify --target go "%s" >> "%t"
// RUN: %diff "%s.expect" "%t"
method Main() {
expect false, "fails";
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-645.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 147 | d7521f40984b90690b98afcecfc6e28f3d641b8960acd1fe05f37e616f08966c | // dafny should emit exit value 1
// RUN: ! %dafny /xyz /useBasenameForFilename > "%t"
// RUN: %diff "%s.expect" "%t"
// UNSUPPORTED: windows
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-659.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 413 | 54eae96ce64576df5068ddfdab863862fbed3fcf38e0631beffd300db19b7d78 | // RUN: %testDafnyForEachResolver "%s"
module A {
module Inner {
export P reveals a,c
export Q reveals b,c
const a := 10
const b := 20
const c := 30
}
}
module X {
import I = A.Inner`P
method m() {
assert I.a == 10;
assert I.c == 30;
}
}
module Y {
impor... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-659b.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 600 | 30013dbcaf36a70c904bb4b9b1b36f3c292cb4e3292110b821d34f0acbca2eda | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
module A {
module Inner {
export P reveals a,c
export Q reveals b,c
const a := 10
const b := 20
const c := 30
}
}
module Z {
import I = A.Inner`P
import J = A.Inner`Q
method m() {
assert I.a == 10;
ass... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-659e.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 711 | 4220d218b37a069a88eac16807de719cf2b88b157e5c066f6811e55e33ffb8a5 | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
module M {
module Inner {
export P reveals a,c
export Q reveals b,c
const a := 10
const b := 20
const c := 30
}
}
module X {
import I = M.Inner`Q
method m() {
assert I.a == 10; // error -- no a in Q
asser... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-663.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 8,138 | 690a47744d207d698daf44522c0a6c6df5f8f72ea3418478f69c7ade69d22bb1 | // RUN: ! %build "%s" &> "%t"
// RUN: %diff "%s.expect" "%t"
method StatementsInCompiledMethod() {
assume false; // error
calc {
100;
== { assume false; } // error
100;
}
assert true by {
assume false; // error
}
ghost var b := true;
if b {
assume false; // error
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-664.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 599 | dad6efb89f19dd9ea777724a5dda7464c0a83d69e42e331f0783a226bc7b1867 | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
class C {
static const X: int
static method M() { }
static ghost function F(): int { 5 }
}
method TestClass(c: C) {
if
case true =>
var x := (if 5/0 == 1 then c else c).X; // error: receiver is not well-formed
case true =>
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-666.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,497 | bcf351f9dc7031a4a5a47ac417195b281d4a122341bff81fff2eb6139f31f57c | // RUN: %exits-with 2 %build --type-system-refresh=false --general-newtypes=false --general-traits=legacy "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
trait O {
function F(): int { 2 }
}
class X extends O { }
class Y extends O { }
method M0() {
var o; // type inferred to be O
o := new X;
o := new Y... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-668.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 625 | e45463ea85e4795eefdbbdf6f615cfa30773b22c4fcda2b6ad8fab6302042112 | // RUN: %exits-with 2 %verify --type-system-refresh=false --general-newtypes=false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
class X {
function F(): int { 2 }
var J: int
}
class K { }
method P0(x: X, k: K) {
var o; // type inferred to be object
o := x;
o := k;
var u := o.F(); // F does not... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-674.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 363 | f88d1cf319e808dcc41b18ad49cac98f96004180b443acdadc67a2de62859244 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
type pos = i:int | i > 0 witness 1
datatype Generic<T> = Gen(p: T)
method Main() {
var p: (pos, pos);
var (a, b) := p;
assert a > 0;
assert b > 0;
var e: Generic<pos>;
var Gen(n) := e;
assert n > ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-684.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 294 | 3b9ebaa3edc7807fe4c4ddeea8bf1bd36519407f18702b203e16ea0cbf25068a | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
datatype Level1 = Level1(u:int)
datatype Level2 = Level2(u:int, l:Level1)
method TestNestedLet() {
var x := Level2(5, Level1(3));
var Level2(u, Level1(v)) := x;
}
method Main() {}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-686.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 487 | c968deb48ef40998d69b066d3e3e8f1fcc5b9bcb530241afe9816c7f87b21eaa | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --allow-warnings --relax-definite-assignment
datatype Color = Blue | Red
function Foo(c: Color): int {
match c
case Blue => 4
case Blue => // warning: redundant branch
5
case Red => 6
}
method Moo(c: Color) returns (x: int) {
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-686a.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,054 | 5beceb8f2f69dfa950bb494612bcb31887ae098ebc3c617bde2194c2688829b4 | // RUN: %exits-with 2 %verify --type-system-refresh=false --general-newtypes=false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
datatype Color = Blue | Red
function Foo(c: Color): int {
match c
case Blue => 4
case Blue => // warning: redundant branch, not shown because of other resolution errors.
as... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-697.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 481 | e5a241a67e87878680553586a3cc53ff81370f6a837b13476f48a8c41c4f7fbf | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
datatype Cell = Cell(x: int)
type EvenCell = c: Cell | c.x % 2 == 0 witness Cell(0)
function doubleEvenCell(c: EvenCell): int
{
if c.x % 2 == 1 then 1/0 else c.x * 2
}
method Main() {
var x: set<Cell> := { Cell... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-697b.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 560 | c0068ff179f1d8eaaaf1caee846ce93d045ee23167cc7d688b19192b2cbec942 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
datatype Cell = Cell(x: int)
type EvenCell = c: Cell | c.x % 2 == 0 witness Cell(0)
function doubleEvenCell(c: EvenCell): int
{
if c.x % 2 == 1 then 1/0 else c.x * 2
}
method Main() {
var x: set<Cell> := {Cell(... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-697c.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 814 | 33c585ad67b557840ccaf82a727081e5372e5354d5cfda0b39916c4078a66f63 | // RUN: %exits-with 2 %run "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
ghost function ghostPredicate(x: int): bool {
x % 2 == 0
}
datatype Cell = Cell(x: int)
type EvenCell = c: Cell | ghostPredicate(c.x) witness Cell(0)
function doubleEvenCell(c: EvenCell): int
{
if c.x % 2 == 1 then 1/0 else c.x * 2... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-697d.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 711 | 234da050de425fd3443aad5f643eb4efdeda9797b0f42efd1762084981d2d16f | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
function nonGhostPredicate(x: int): bool {
x % 2 == 0
}
datatype Cell = Cell(x: int)
type EvenCell = c: Cell | nonGhostPredicate(c.x) witness Cell(0)
function doubleEvenCell(c: EvenCell): int
{
if c.x % 2 == 1 ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-697e.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 462 | 417cfcac28d93c73ce39bad421af3c4679e0c9fe9b9746397b13f23f6b2e683b | // RUN: %testDafnyForEachCompiler "%s" -- --type-system-refresh=false --general-newtypes=false --relax-definite-assignment
datatype Cell = Cell(x: int)
type EvenCell = c: Cell | c.x % 2 == 0 witness Cell(0)
function doubleEvenCell(f: EvenCell): int
{
if f.x % 2 == 1 then 1/0 else f.x * 2
}
method Main() ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-697f.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 509 | 559f156e3edd6cadae2e1cdcfe9f22a43cf0050b9ae7937a5401dfc408663e1c | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
ghost function ghostPredicate(x: int): bool {
x % 2 == 0
}
datatype Cell = Cell(x: int)
type EvenCell = c: Cell | ghostPredicate(c.x) witness Cell(0)
function doubleEvenCell(c: EvenCell): int
{
if c.x % 2 == 1 ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-697g.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 338 | 7a9c288873e1450445aaf180e2903beafffa802fc3b378b6d08417ddfb520b95 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
function returnNat(c: nat): int
{
if c < 0 then 1/0 else c
}
method Main() {
var x: set<int> := { -1, 2, -3, 4 };
var y := set c: nat | c in x;
var b := forall c :: c in y ==> returnNat(c) >= 0;
assert b;
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-697h.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 962 | 6b76c075500e13dcd1d2fab73bf25034e2f514419b78a1a36e5ed8acf08727dd | // RUN: %verify --relax-definite-assignment "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
ghost const maxi := 4
type substring = x: string | |x| < maxi
// It's ok to have not compiled subset types in all specification expressions
method test(s: seq<substring>) returns (r: int)
requires forall x: substring ::... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-697i.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 7,170 | d34092b37c48a2ae1fcd67ead0337433a974f4c2cc4ba5bd1b12f69f960347fe | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
method Main() {
Tests.Test();
SubsetTypeSubsetType.Test();
SubsetTypeNewtype.Test();
NewtypeSubsetType.Test();
NewtypeNewtype.Test();
}
module Tests {
ghost predicate P(x: int) { x != 3 }
type PlainInt = int // type synonym
t... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-697j.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 8,395 | 9527ac78cb8ac93b61d6a348dc452f6551138c0426b2cb2e61ce50bdd377d5f9 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --allow-warnings
method Main() {
Tests.Test();
AnotherTest.Test();
SubsetTypeSubsetType.Test();
SubsetTypeNewtype.Test();
NewtypeSubsetType.Test();
NewtypeNewtype.Test();
MoreNativeTypes.Test();
Regressions.Test0();
Re... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-697k.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,062 | 1424b9f9d036263d87fd787b64dd1f5a1a84dfd0fe1a0e02380d88bbd993b694 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s"
method Main() {
M.TestTraits();
M.TestConstraintsSimple();
SimpleSetContainmentTests.Test();
}
module M {
trait MyTrait extends object { }
class MyClass extends MyTrait { }
class AnotherClass extends MyTrait { }
method TestTraits... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-698.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 321 | 0456288cfd4a234cf3aa04e7469cd70fa03d7025c3a0d65063ecd2017832efd1 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
type Small = x: int | 0 <= x < 100 && x != 3
function F(x: int): int
requires x != 3
{
if x == 3 then 1/0 else 100
}
method Main() {
var b := forall n: Small :: F(n) == 100;
assert b;
print b, "\n";
}
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-698b.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 316 | eabc1f7b5ad833cc325fa368f4955d13ba803a68af2359ebad8212e32083c8b0 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
type Small = x: int | 0 <= x < 100 && x != 3
function F(x: int): int
requires x != 3
{
if x == 3 then 1/0 else 100
}
method Main() {
var b := !exists n: Small :: F(n) != 100;
assert b;
print b;
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-701.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 576 | 71fc81f27e7eadcafac0ba56f037740ee87333fbb49866b979987bba6ccec5e5 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
method Main() {
var ca := new ClassA;
print ca.y, " ", ca.k, " ", ca.l, "\n";
var cb := new ClassB;
print cb.y[..], " ", cb.k[..], " ", cb.l[..], "\n";
var cc := new ClassC;
print cc.y, " ", cc.k, " ", cc.l,... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-705.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 268 | 35351bdc061bf200831a1a78cff46423ca6bade2404ff035b3ad305af6ea5b1a | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment --spill-translation
datatype MyDataType = AAA {
function toString(): int { 222 }
}
method Main() {
var dt: MyDataType;
print dt, " ", dt.toString(), "\n";
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-731.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 648 | 2931b11ffc6e572ad7eb0da0ef460373cd03f567fd7a05e5d29ec14a34a42f59 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
trait Trait<Y> extends object {
const y: Y
const k: Y := y
const l: Y
}
class ClassB extends Trait<array<bv8>> {
var m: array<bv8>
constructor () { m := new bv8[42]; }
}
class ClassC extends Trait<array... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-731b.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 451 | b90d7cfed3a2df06d4298431513401f79154e2bce981e3f31cf8eee6179a16c7 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
// Testing issue#731 when the class in question has type parameters
trait Tr2<W, Y> extends object {
const w: W
const y: Y
}
class ClassA<Q> extends Tr2<Q, array<bv8>> {
constructor (q: Q) { w := q; }
}
me... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-748.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 360 | 0b70bdfca5cb6f216ffddca52663de68cdea207c6b6d3bccaea5fdef9ee433b7 | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
method ok() {
var array0: int := 10;
var array1: int := 10;
var array1?: int := 10;
var array10z: int := 10;
var bv01: int := 100;
var y: array2;
var z: array10;
var b: bv0;
}
method badids() {
var array2: string;
var a... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-748a.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 350 | 6292adb3d0ae4a749fa7a50ccce019243e5ba25e3751d270dbc0266b48304e04 | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
method ok() {
var array0: int := 10;
var array1: int := 10;
var array1?: int := 10;
var array10z: int := 10;
var bv01: int := 100;
var y: array2;
var z: array10;
var b: bv0;
}
method badtypes() {
var x: array0;
var y: a... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-750.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 540 | 49d4bc5d4100c71698afff8762ad9e328ffac66da34773d19ff7c8787c5ee0b3 | // RUN: %exits-with 2 %verify --type-system-refresh=false --general-newtypes=false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
method m() {
var a: array<nat> := new nat[10];
var b: array<int> := new int[10];
b := a; // type error expected
a := b; // type error expected
mm(b, a);
}
method mm(x: a... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-755.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,397 | ab7a593977e73c3bb38c9a79cfca1d7364177af6ed5987f10767f0b71ab6d5b4 | // NONUNIFORM: https://github.com/dafny-lang/dafny/issues/4108
// RUN: %verify "%s" > "%t"
// RUN: %run --no-verify --target cs "%s" >> "%t"
// RUN: %run --no-verify --target js "%s" >> "%t"
// RUN: %run --no-verify --target go "%s" >> "%t"
// RUN: %run --no-verify --target java "%s" >> "%t"
// RUN: %diff "%s.exp... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-757.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 356 | 67a10c2815778f195cb24611c4e6d69565efe1dcdaa0f17ac3dd55884da7791b | // RUN: %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module M {
export
provides A, A.New
datatype A<T> = A(s:seq<T>) {
static method New() returns (self: A<T>) {
self := A([]);
}
}
}
module M2 {
import M
method test() {
var a := M.A<int>.New(); // Used to throw ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-779.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,559 | 38d6e30eeba4ecdd0533e01e9d08894daf0086c7c1a1a37e23aa3ff41d060ce1 | // RUN: %verify --relax-definite-assignment --type-system-refresh=false --general-newtypes=false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// Lines marked PRE-FIX were problems before this bug was fixed
method GenericMethod<X>(x: X) { }
method GenericMethodWithResult<X>(x: X) returns (y: int) { }
function Gen... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-784.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 793 | 33e700676af767989ce61b2c31e1431db3ab39816f351f7bce96737156dd5365 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
datatype List<T> = Nil | Cons(T, List<T>) {
function App(ys: List<T>): List<T> {
match this
case Nil => ys
case Cons(x, xs) => Cons(x, xs.App(ys))
}
static ghost function Concat<T>(l: List<List<T... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-816.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 535 | a0b4da0545568939b052688919d2d08d501e75d032f2a7f5968777d840c44635 | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
lemma P0(x: int)
requires X: x == 17
{
assert x == 17; // error: because X hasn't been revealed
}
lemma P1(x: int)
requires X: x == 17
{
reveal X;
assert x == 17; // this verifies, because X has been revealed
}
least lemma Q(x: ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-817.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,069 | bd9bac82bcc998c4a38423b937157fa9b355dc9b00e27f647d9f3adfe7f33188 | // RUN: %testDafnyForEachCompiler "%s" -- --type-system-refresh=false --general-newtypes=false
datatype Result<T> = Failure(msg: string) | Success(value: T) {
predicate IsFailure() { Failure? }
function PropagateFailure(): Result<T> requires IsFailure() { this }
function Extract(): (t: T) requires !IsFailur... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-817a.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,185 | ae6d703bb3694dbc260ed2569534728d4abd68fa922f53998ed07e56a45ef344 | // RUN: %testDafnyForEachCompiler "%s" -- --type-system-refresh=false --general-newtypes=false
datatype Result<T> = Failure(msg: string) | Success(value: T) {
predicate IsFailure() { Failure? }
function PropagateFailure(): Result<T> requires IsFailure() { this }
function Extract(): (t: T) requires !IsFailur... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-817b.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 793 | 50c7095451ed1c829e4e59a621b02a8bade483286a3abb42c5a03f4b5a16dfd2 | // RUN: %exits-with 4 %verify --relax-definite-assignment --type-system-refresh=false --general-newtypes=false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
datatype Result<T> = Failure(msg: string) | Success(value: T) {
predicate IsFailure() { Failure? }
function PropagateFailure(): Result<T> requires IsFailure... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-817c.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,217 | d7e7c3a82cf3469f15429b7f12c46a63f0bbc7b7cce34660aeed52dc9fa0eb14 | // RUN: %exits-with 4 %verify --relax-definite-assignment --allow-deprecation --type-system-refresh=false --general-newtypes=false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
datatype Result<T> = Failure(msg: string) | Success(value: T) {
predicate IsFailure() { Failure? }
function PropagateFailure(): Result<T... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-817d.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 683 | eee15aaf5a6b314570bae1485771876b779dbaca021ff0bfa492f8848c725ed5 | // RUN: %exits-with 2 %verify --type-system-refresh=false --general-newtypes=false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module M {
datatype Result<T> = Failure(msg: string) | Success(value: T) {
predicate IsFailure() { Failure? }
function PropagateFailure(): Result<T> requires IsFailure() { this ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-833.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 309 | 234980e29cbdd5e36e0be3a5a70d7084e1f86240ac4c167bedfa9fa7a8f5c116 | // RUN: %testDafnyForEachResolver "%s"
class C {
ghost var x:int
method f(ghost y:int) {}
method test0() { f(x);} // passes
constructor(ghost y:int) {x:=y;}
method test1() returns (c:C) { c := new C(x); } // used to fail with "ghost fields are allowed only in specification contexts"
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-845-comments.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 204 | 3aeacdb634b4be2e219b2ec3b5a90565359c92abec29267e25d69883af09e19c | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
// Demonstrates that nested comments don't work with */ in line comment
method m() {
/*
var b: int;
// */
var c: int;
*/
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-845-comments2.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 218 | e9cee7070b8bdb4b163e8a7919e274341d8f6e73fd2abe687a2454b48872db9a | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
// Demonstrates that nested comments don't work with */ in strings
method m() {
/*
var b: int;
var s: string := "a*/b";
var c: int;
*/
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-847.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,170 | baa021ca3bd7f8b2e0520fbd117ce47a9f9eff09db82affba89ce73b2e62f6bd | // RUN: %exits-with 2 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
trait O extends object {
var rep: set<O>
ghost function union<T>(s: set<set<T>>): set<T> {
set o,o1 | o in s && o1 in o :: o1
}
least predicate ag()
reads *
{
rep=={} || (forall o: O | o in rep :: o.ag())
}... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-849.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 218 | c9827bb968b390f9d5245083de31db0c9a6e7f7fd0ee181ef22fe49da2018bf9 | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
module A {
datatype Test = Test(v: nat, w: nat)
method m(oldTest: Test) {
var newTest: Test := oldTest[v := 1]; // error: old syntax
}
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-849a.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 186 | 19508b439c9a214ee972b5c874fc12696e325f42deccd36f843081313b0bf942 | // RUN: %testDafnyForEachResolver "%s"
module B {
datatype Test = Test(v: nat, w: nat)
method m(oldTest: Test) {
var newTest2: Test := oldTest.(v := 1, w := 2);
}
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-851.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 8,843 | 6c57c8fdb3ce017f15e716e9f33bca836fd260adc328a308deabfeb781dbc15e | // RUN: %exits-with 4 %verify --allow-axioms "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module ExampleA {
export
provides Test
trait C {
ghost predicate F()
ensures false
}
ghost predicate BadGhost()
ensures false
{
// regression: in the the following line, the verifier... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-852.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 652 | a139e701526113adf20aaecbc895ea90c8c2c3dd4edcdb1b0247e578212d1161 | // RUN: %exits-with 2 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
abstract module M0 {
newtype T = n:nat | true {
ghost predicate p() {true}
}
}
module Q0 refines M0 {
newtype T = n:nat | true { // error: needs ...
ghost predicate p() {true}
}
}
module Q1 refines M0 {
newtyp... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-854.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 273 | dcd1fbf285492e4b3d267553d53ffe2d2c5a6eb21eb3a7e8b889a17825113722 | // RUN: %exits-with 2 %verify --type-system-refresh=false --general-newtypes=false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module M {
export provides l
lemma l() ensures true {}
}
module N {
import M
ghost function f(): nat { assert M.l(); 3 }
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-856.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 426 | 076299810e558b8c7ba5a3884a80f03e73d1ad0ae6c3234f54b00f03c9bcee47 | // RUN: %verify "%s" > "%t"
// RUN: ! %run --no-verify --target cs "%s" >> "%t"
// RUN: %exits-with 3 %run --no-verify --target js "%s" >> "%t"
// RUN: ! %run --no-verify --target go "%s" >> "%t"
// RUN: ! %run --no-verify --target java "%s" >> "%t"
// RUN: %diff "%s.expect" "%t"
method Main()
{
var big := ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-859.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 393 | a9230169c4c56763452130144ddaab4cd2dc26e5f6c830c6257a72104aeddd8b | // RUN: %testDafnyForEachCompiler "%s"
datatype FailureCompatible = Make {
predicate IsFailure() { true }
function PropagateFailure(): int { 12 }
function Extract(): (r: real) { 0.0 }
}
method M() returns (r: FailureCompatible) {
r := *;
}
method N() returns (x: int) {
var s: real :- M();
r... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-859a.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,271 | a44501112141f437d72f290330466cc7079ac75da799000df35aa0c4e918292b | // RUN: %exits-with 2 %verify --type-system-refresh=false --general-newtypes=false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module Common {
datatype FailureCompatible = Make { // Extract is ghost
predicate IsFailure() { true }
function PropagateFailure(): real { 12.0 }
ghost function Extract(): ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-859b.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,089 | c0ee135be14707515fc11a5c4f1b3f3167e07e5325fbcc179897ad07cf83c0d7 | // RUN: %exits-with 2 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
datatype FailureCompatible = Make {
ghost predicate IsFailure() { true }
ghost function PropagateFailure(): real { 12.0 }
ghost method Extract() returns (r: real) { }
}
datatype FailureCompatible2 = Make {
predicate IsFailure()... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-859c.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 937 | f09eefc66ae2bb93b7ee1de0fe33d8891ed67126452a69bebd1c028cf027c3f7 | // RUN: %exits-with 2 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
datatype FailureCompatible = Make {
ghost predicate IsFailure() { true }
ghost function PropagateFailure(): real { 12.0 }
ghost function Extract(): real { 9.0 }
}
datatype FailureCompatible2 = Make {
predicate IsFailure() { tru... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-863.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 215 | dfb4a01a631d4f458e066c0b4dbd843d574365decdc582775bb1c6f1b8a21723 | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
datatype D = D(ghost v:nat)
function p():D { ghost var v:nat :| true; D(v) }
datatype G = G(v:nat)
function q():G { var v:nat :| true; G(v) }
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-864.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 631 | 24f95d792db65b57586781d87671531194e6cd1d7a947aac142fda9d84c4007f | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
module M1 {
trait {:termination false} T0 {
const b: bool
}
trait T1 extends T0 {
}
}
module M2 refines M1 {
trait T1 { // error: name T1 already used (since without the "...", this looks like a new trait)
ghost pre... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-864rr.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 417 | b8bf61e8fc08e2fd981df31c44c6e55ec9f2ba27949fca3ae47c02077e0ee638 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s"
// Tests the resolution of the refinement parent -- that it ignores
// local declarations.
module A {
const a := 10
}
module B refines A { // ignore the submodule A, use the top-level A
module A {
const a := 30
}
method Main() {
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-864y.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 851 | 757f7a1714ccf00141e6f843604e8f947603812216f7359375304fc877800d4d | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
module B {
export B reveals *
module A { const a := 30 }
const A := 60
}
// This duplicate definition causes an inscrutable follow-on error in
// processing the export set. The 'reveals *' creates a list of
// ExportSignatures by name and w... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-864z.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 458 | 1ff0503b3d4a18d920b621fb33aef266c8f153b19284bb9afabb24da5717cd46 | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
module A {
export reveals a
const a := 10
const b := 20
}
module B refines A {
export reveals *
const c := 30
}
module C {
import B
method m() {
assert B.c == 30;
assert B.a == 10;
assert B.b == 20;
}
}
m... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-864z1.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 373 | 7506ba3e0d4f32e092c27199abdf83297a21be766b491e5c0bc1f8caee67915c | // RUN: %testDafnyForEachResolver "%s"
module A {
export reveals a
const a := 10
const b := 20
}
module B refines A {
export reveals *
const c := 30
}
module C {
import B
method m() {
assert B.c == 30;
assert B.a == 10;
assert B.b == 20;
}
}
module D {
import B... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-864zz.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 207 | 4b85c2fbb6b705331acfa47b887340606fb8759d66ff24b44a0c66b3c3d5b673 | // RUN: %testDafnyForEachResolver "%s"
module A {
export reveals a
const a := 10
const b := 20
}
module B refines A {
export X reveals * extends A // used to complain A is not in B
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-867.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,222 | b604e7f3433a7f8d7538d405f491ee53ab04189eeeebd3b5404871b104f03b43 | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
// The following compiled function was always handled correctly:
function PickOne0(s: set<int>): int
requires s != {}
{
var u :| u in s; // error: u is not picked uniquely
u
}
// In PickOne1 and PickOne2, the body of the outer let expres... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-885.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,389 | 251dd33dad10da092dc776903e708413b93d783c7cea45f8a28a035916ef70a4 | // RUN: %exits-with 4 %verify --type-system-refresh=false --general-newtypes=false --general-traits=legacy "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// Note, this file is testing the old resolver. The new resolver requires explicit casts to go from a trait to a class.
trait Trait { }
class Class extends Trait { }
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.