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/dafny0/Fp64ResolutionAndLanguage.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 5,520 | ae994ca5ac723ee1db07725f9614945ee2829fa9e1633564f54c1754be700e8c | // RUN: %testDafnyForEachResolver "%s"
// fp64 language integration and resolution tests
// Tests how fp64 integrates with Dafny's language constructs, type inference, and operations
method TestBasicLiteralAssignment() {
// Basic literal assignment with type inference
var x: fp64 := ~3.14;
var y: fp64 :... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Fp64SpecialValues.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 13,191 | 9ca45a346e96505d3afbe02af0a7453a9445e9d62a436d73a545ef69b59d2bf4 | // RUN: %testDafnyForEachResolver --expect-exit-code=0 "%s"
// Test for fp64 additional special values
// Tests special constants like PositiveZero, NegativeZero, MaxValue, MinValue, etc.
method TestZeroValues() {
// Test positive and negative zero literals
var pos_zero: fp64 := 0.0;
var neg_zero: fp64 ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Fp64Wellformedness.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,798 | 44f3f34dd70b54c0901f0bdf8aa691ca45bbd71e2b0dca011f9848a941e82baf | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
// Test wellformedness checks on fp64 operators
method ArithmeticNaN(x: fp64, y: fp64) {
var _ := x + y; // ERROR x2: requires !x.IsNaN && !y.IsNaN
var _ := x - y; // ERROR x2
var _ := x * y; // ERROR x2
var _ := x / y; // ERROR x3: !x.Is... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Fuel.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 15,158 | 084a040973093a753e7393f1394dbd9c712891b8ed484a3113f5c090ae4426eb | // RUN: %exits-with 4 %verify --allow-deprecation --manual-triggers --error-limit 0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module TestModule1 {
ghost function pos(x:int) : int
{
if x < 0 then 0
else 1 + pos(x - 1)
}
method test(y:int, z:int)
requires y > 5
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/fun-with-slices.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 557 | f4140b10ee70c5a2c0cbcc34f3b61121e41dc903979a9c06c5489984117d7453 | // RUN: %testDafnyForEachResolver "%s"
// This test was contributed by Bryan. It has shown some instabilities in the past.
method seqIntoArray<A>(s: seq<A>, a: array<A>, index: nat)
requires index + |s| <= a.Length
modifies a
ensures a[..] == old(a[0..index]) + s + old(a[index + |s|..])
{
var i ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/FunctionSpecifications.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,230 | b688d0ebedaeef33a6a1d758466bf51e927d556061e8dce4542645e0725dea6c | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
ghost function Fib(n: int): int
requires 0 <= n
ensures 0 <= Fib(n)
{
if n < 2 then n else
Fib(n-2) + Fib(n-1)
}
datatype List = Nil | Cons(int, List)
ghost function Sum(a: List): int
ensures 0 <= Sum(a)
{
match a
case Nil =>... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GeneralNewtypeCollections.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 12,084 | d2ce9c7baf39dc3f997a295afb2ac6e053f25ad96f103b52cf55fd22303a3826 | // RUN: %testDafnyForEachCompiler "%s" -- --type-system-refresh=true --general-newtypes=true --general-traits=datatype --reads-clauses-on-methods
method Main() {
Set.Test();
Set.TestSpecialCase();
Iset.Test();
Frames.CallEm();
Decreases.Test();
Multiset.Test();
Seq.Test();
SeqToMultisetConver... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GeneralNewtypeCollectionsGeneric.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 12,260 | 6006a041f0c7800397fe69b8fe81d5b55edc5642c669b5ed31b37730b2234c03 | // RUN: %testDafnyForEachCompiler "%s" -- --type-system-refresh=true --general-newtypes=true --general-traits=datatype --reads-clauses-on-methods
method Main() {
Set.Test();
Set.TestSpecialCase();
Iset.Test();
Frames.CallEm();
Decreases.Test();
Multiset.Test();
Seq.Test();
SeqToMultisetConver... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GeneralNewtypeExtends.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,273 | aecfd9a9fce0f05ffdda4ebf1e001a7b47682eeb28af083e253c99b068985982 | // RUN: %exits-with 2 %verify --type-system-refresh --general-newtypes --general-traits=full "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module DirectParents {
trait SupportsAdd {
function Add(x: int): int
}
newtype MySet extends SupportsAdd = set<int> {
function Add(x: int): int {
3 * |t... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GeneralNewtypeMemberCompile.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,069 | ebf48bb129417d0fd719e42c25e9697b6154b7bb242db024965c41c4b6e76f5f | // RUN: %testDafnyForEachCompiler "%s" -- --type-system-refresh=true --general-newtypes=true
method Main() {
Members.Test();
}
module Members {
method Test() {
TestConst();
var b := TestFunction();
b.PrintMe();
TestBoolBool(true);
Int.P(b);
(5.98 as Real).M();
(2.98 as ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GeneralNewtypeMemberResolution.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,604 | 867cfe403abf94b10d031634283a92b98d82e1a6dd58f92261a57be893d98526 | // RUN: %exits-with 2 %verify --type-system-refresh --general-newtypes "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module Fields {
newtype Bool = bool {
var x: int // error: a newtype is not allowed to have a mutable field
}
}
module Members {
method Test() {
var b: Bool := true;
b.PrintM... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GeneralNewtypeMemberResolutionReal.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,023 | 69bb35144b4a7b17d0b0cfbabf2b7a33f5c9f0361f70a68826f469bb4da39333 | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s" -- --general-traits=full
// The following tests apply only --general-traits=full, since that mode allows a newtype to both
// be based on `real` and extend traits.
// Alternatively, if newtypes could have a datatype as the base type, then these tests coul... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GeneralNewtypeMemberVerify.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,163 | f3593e8973d3b7d2b7c136972ecf3816abb73394aea61cdca75325b40fd8ec8b | // RUN: %exits-with 4 %verify --type-system-refresh --general-newtypes "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module Members {
method Test() {
TestConst();
TestFunction();
TestBoolBool(true);
}
method TestConst() {
var b: Bool := true;
assert b;
assert b.n == 4;
b :... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GeneralNewtypeMemberVerifyReal.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,208 | 3b85ba01623a0d34c62e9ed0cf37bb092e8e5f98ef6d4c7ebf1d52a7eb35fcb5 | // RUN: %exits-with 4 %verify --type-system-refresh --general-traits=full --general-newtypes "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// The following tests apply only --general-traits=full, since that mode allows a newtype to both
// be based on `real` and extend traits.
// Alternatively, if newtypes could hav... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GeneralNewtypeResolution.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 28,903 | abe98e22f6bd83df0993cc0c60ee076408ab89f4ca074b63790d1db499daa93c | // RUN: %exits-with 2 %build --type-system-refresh --general-traits datatype --general-newtypes false "%s" > "%t"
// RUN: %exits-with 2 %build --type-system-refresh --general-traits datatype --general-newtypes true "%s" >> "%t"
// RUN: %diff "%s.expect" "%t"
module VariousBaseTypes {
newtype byteA = x | 0 <= x ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GeneralNewtypeVerify.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 16,800 | 13577ae6d847526c16b6c1950f7858a61b46d5b378147a7f87e9453bf75e6037 | // RUN: %exits-with 4 %build --type-system-refresh true --general-newtypes true --relax-definite-assignment "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module EmptyBool {
newtype MyBool = bool
newtype AnyBool = b: bool | true
newtype NoBool = b: bool | false witness *
method M0(a: MyBool, b: AnyBool) {... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GhostAllocations-Resolution.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 19,487 | 9b4e10e5c9721ef31adb776ba5521050c4c7e6a058693b96c2592ddf343ec3a5 | // RUN: %exits-with 2 %build --type-system-refresh=false --general-newtypes=false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// ------- A constructor-less class can be allocated as either ghost or non-ghost
module ConstructorLessClass {
class Cell {
var data: int
}
method Cell0() returns (r: Cell... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GhostAllocations.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,067 | 54e2123096a5866088172e0eaed1d2aa440ca3646b7b25798d84e70187a4a31e | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
class Cell {
var data: int
}
method M() returns (c: Cell)
ensures fresh(c)
ghost method G() returns (c: Cell)
ensures fresh(c)
lemma L() returns (c: Cell)
ensures fresh(c)
twostate lemma L2() returns (c: Cell)
ensures fresh(c)
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GhostAutoInit.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 10,199 | 7f08515f9a84f65fbc112b905669f888e122a03be73de5e679a83c1493ba751a | // RUN: %exits-with 4 %verify --relax-definite-assignment --allow-axioms "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module DeclaredTypes {
trait MaybeEmpty extends object { }
type GhostAutoInit = x: MaybeEmpty? | true ghost witness null
type CompileAutoInit = MaybeEmpty?
method NotUsed() {
var ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GhostDatatypeConstructors-Resolution.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 8,481 | 38162de2f930ebcb0bb56cc26e462a2f94c9c73d1c897786f333bff390452723 | // RUN: %exits-with 2 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module Types {
datatype XY =
| {:testAttr0} D0(x: int)
| ghost {:testAttr1} G0(y: bool)
| ghost G1(y: bool, z: real, w: char)
| {:testAttr2} D1(z: real)
datatype Wrapper<A> = Wrapper(A)
}
module Ghost {
impor... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GhostDatatypeConstructors-Verification.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,056 | 5c9bd2915698e01c0a42fca23eebaf497ecb75ddedca35218edba5989cb6052e | // RUN: %exits-with 4 %verify --relax-definite-assignment "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module Types {
datatype XY =
| D0(x: int)
| ghost G0(y: bool)
| ghost G1(y: bool, z: real, w: char)
| D1(z: real, y: bool)
class Cl { }
datatype G = G(Cl)
}
module Ghost {
imp... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GhostGuards.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 860 | 47ff775e338f4409e17779b378a8c8e11728a20642e4ff49156793806df5db68 | // RUN: %verify --show-hints --relax-definite-assignment "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
datatype Dt = Green | Dog
method Main()
{
var x: bool;
ghost var g: bool;
if x {
} else if g { // ghost if
} else if x {
} else if g {
} else {
}
if { // ghost if
case true =... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GhostITECompilation.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,701 | a3ad2eb031dada99e6c1c777e18597fd2f5b8fa74e2d8466094ef941d29689b6 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --function-syntax:4 --relax-definite-assignment --allow-warnings
function F(x: nat, ghost y: nat): nat
{
if x == 0 then
0
else if y != 0 then
F(x, y - 1) // this branch is not compiled (which even makes F auto-accumulator tail recursive... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GhostITEResolution.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,378 | d4e19b5e35f0dd85a390379745ca8b2dddafed486dbc648ef9b073cda09ea703 | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
function E(x: nat, ghost y: nat): nat
{
if x == 0 then
0
else if y != 0 then
E(x, y - 1) // the "+ 0" ruins the chance of a ghost-ITE transformation
else
E(x - 1, 65) + 13
}
function F(x: nat, ghost y: nat): nat
{
if x == ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/GhostPrint.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 264 | 41b5e24121d2f1a4d6b84081ebe4046cf7b710fb3e81e8329c93576a5b127ea8 | // RUN: %resolve --print:"%t.dprint.dfy" "%s"
// RUN: %resolve "%t.dprint.dfy" > "%t"
// RUN: %diff "%s.expect" "%t"
method M() {
ghost var h := var ta := F(); 5;
var j := ghost var tb := F(); 5;
assert h == j;
}
ghost function F(): int { 5 }
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/IMaps.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,825 | b4291bb979280f41cad8f8c8ec4aea33fd7224be08f90c7ee6c06adadef72b88 | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" -- --allow-deprecation
// This method can be used to test compilation.
ghost method M()
{
ghost var im := imap[2:=3];
// test "in"
if(2 in im)
{
}
else
{ assert false; }
// test "!in"
if(3 !in im)
{
}
else... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/IMaps2.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 629 | ed55890ce94389cccfa371b14ca1afaf18ee84111650769a28c04ab753bfeb9f | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
ghost function domain<U, V>(m: imap<U,V>): set<U>
// ensures forall i :: i in domain(m) <==> i in m
ensures forall i :: i in domain(m) ==> i in m
ensures forall i :: i in domain(m) <== i in m
{
set s | s in m // UNSAFE, m may have infinit... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ImplicitTypeParamPrint.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 924 | 21d5fc2afa943ffd87560de6ba2e926cd163e598c3c0b047527d372d31b8299f | // NONUNIFORM: Multiple tests in one, fairly C# specific
// RUN: %resolve --rprint "%t.dfy" "%s"
// RUN: %resolve --print-mode Serialization --rprint "%t1.dfy" "%t.dfy"
// RUN: %run --print-mode Serialization --rprint "%t2.dfy" "%t1.dfy" > "%t"
// RUN: %diff "%t1.dfy" "%t2.dfy"
// RUN: %diff "%s.expect" "%t"
da... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Include.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 820 | 2412e1094221b44b651e76ba699b2a445c2a92c5132132e9bf797e31ac551fea | // RUN: %exits-with 4 %verify "%s" > "%t"
// RUN: %exits-with 4 %verify --verify-included-files "%s" >> "%t"
// RUN: %diff "%s.expect" "%t"
include "Includee.dfy"
method test_include(z:int)
{
// Make sure we can still see function bodies
assert forall y :: f(y) == 2*y;
// Use an unverified method
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Includee.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 546 | 38b39fa4acba8546407d83395553b96bb8e6b7cbf5418c497b0b546167821a9d | // RUN: %exits-with 4 %verify --relax-definite-assignment "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
method m_unproven(x:int) returns (y:int)
ensures y == 2*x
{ // error: postcondition violation
}
ghost function f(x:int) : int
{
2*x
}
abstract module Abstract
{
function inc(x:int) :int
ens... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/incompatibleAttributes.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 148 | 1359e5aabc14adace74441f53234127e2d86bbb9d93c2fdb37a0e94b9a084a2c | // RUN: %exits-with 2 %resolve "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
method {:rlimit 10} {:resource_limit 10000} M() {
assert true;
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/IndexIntoUpdate.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 245 | e238fe1bc13281f1d30c8c934c6879a6d96d34bc7d42bc21a1c9f3576bda463b | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
method M() {
var s := [1, 2, 3, 4];
assert 3 in s;
s := s[0 := 1];
if * { assert 3 in s; } // FIXME: This should verify
else { assert s[2] == 3; assert 3 in s; }
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/InductivePredicates.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 7,533 | 8998f2c70ef54d7c87c9a6bb6ebc3f78210ce5be5146ca98563f44577502ad4f | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
datatype natinf = N(n: nat) | Inf
least predicate Even(x: natinf)
{
(x.N? && x.n == 0) ||
(x.N? && 2 <= x.n && Even(N(x.n - 2)))
}
lemma M(x: natinf)
requires Even(x)
ensures x.N? && x.n % 2 == 0
{
var k: ORDINAL :| Even#[k](x);
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/InitialValues.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 825 | de03b5964f415ca561a9e8c1657581976b8a54ca51b471c4759848fd3a56082e | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
method Main()
{
TestReals();
}
// This method produces an auto-initialized value
method Init<T(0)>() returns (t: T)
{
}
method TestReals()
{
// Several of the cases below are regression tests of things that ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/InSetComprehension.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,055 | e20dbb4e3cf31c6bb2f46d096bf2ed0984a65aa111b2f90d23d80e73a7af91c3 | // RUN: %verify --show-hints "%s" --allow-warnings > "%t"
// RUN: %diff "%s.expect" "%t"
lemma Tests<T>(t: T, uu: seq<T>) returns (z: bool)
requires 10 <= |uu| && uu[4] == t
ensures !z
{
if {
case true =>
z := 72 in set i | 0 <= i < 10;
case true =>
z := -8 in set k: nat | k < 10;
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Inverses.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 6,360 | f38fb2e4da633bb864013c49d5df0bdaac3f9d22fbf76fb98b0c88ac1d356eb1 | // RUN: %exits-with 4 %verify --allow-deprecation "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// This identity function is used to so that if the occurrence of i below
// that is enclosed by Id gets chosen by the SMT solver as a trigger, then
// Id will be part of that trigger. This means that the quantifier will... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ISets.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 925 | be154eb25e7d5b1d18c558f3a59e2287bdd35c67e97c3a174bf9e7476c8af173 | // RUN: %testDafnyForEachResolver "%s"
ghost method M()
{
ghost var s := iset{2};
// test "in"
if(2 in s)
{
}
else
{ assert false; }
// test "!in"
if(3 !in s)
{
}
else
{ assert false; }
if(s == iset{2})
{
}
else
{ assert false; }
}
ghos... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/IteratorResolution.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 11,143 | c691dbab8007f959ffe695f5d6ddfbff22ce40c0135018db9c8b37e26b55271a | // RUN: %exits-with 2 %verify --type-system-refresh=false --general-newtypes=false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module SimplestIter {
iterator MyIter()
}
module Mx {
iterator ExampleIterator(k: int) yields (x: int, y: int)
{
var i := k;
while true {
if i % 77 == 0 { yie... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Iterators.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 11,459 | e8db56af89a6317018daded1748d51bb34e921762b88da2f2bbe5b91b3b717c4 | // RUN: %exits-with 4 %verify --relax-definite-assignment --allow-deprecation "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
iterator MyIter<T(0)>(q: T) yields (x: T, y: T)
{
}
iterator MyIntIter() yields (x: int, y: int)
{
x, y := 0, 0;
yield;
yield 2, 3;
x, y := y, x;
yield;
}
iterator Natura... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/JavaUseRuntimeLib.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 371 | 3fe6e84fa55c305d8c3cf0d9f4bb938d2b92039a1aeacc9f261b8f787f7b0cc1 | // RUN: %dafny "%s" /useRuntimeLib /out:%S/Output/DafnyConsole.jar /compileTarget java > "%t"
// RUN: java -cp %binaryDir/DafnyRuntime.jar%{pathsep}%S/Output/DafnyConsole.jar DafnyConsole >> "%t"
// RUN: %diff "%s.expect" "%t"
module DafnyConsoleMod { // TODO if we name this DafnyConsole, then Java compilation fai... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/JustWarnings.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 744 | 6ec6ad8bf688b72b1d3803038fc5f78c1a4a46ea66883ebebdd0a957399530da | // RUN: %testDafnyForEachResolver "%s" -- --warn-shadowing --allow-warnings
// This file tests the behavior where the Resolver reports some warnings
// but no errors. In the case of errors, resolution does not continue
// to clone modules and resolve them, but the cloning does proceed if there
// are only warn... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/LabeledAsserts.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 5,857 | 726006c6217447643aadef60537f0b48ca870cc55b368da8fda65a627a86ab03 | // RUN: %exits-with 4 %build "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
class C {
var g: int
var h: int
}
// Here are examples of suppressed preconditions and assertions
method M0(x: int, y: int)
requires 0 <= x
requires Y: 0 <= y
{
assert 0 <= x;
assert 0 <= y; // error: labeled requires... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/LabeledAssertsResolution.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 10,993 | ecf565f82c14546da219b164dce58c4c739b2a933a8aea90ef80a8850dc375d5 | // RUN: %exits-with 2 %build "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module ResolutionTests {
lemma A(b: bool, m: int, n: int)
requires m < n
requires sea: m + 3 < n
requires sjc: m + 5 < n
requires sjc: m + 7 < n // error: dominating label
requires jfk: m + 9 < n
requires m < n... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/LabelsOldAt.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 10,830 | c12fe11e4e68d675875943ac618f3b2ae688d122abdb326a1b3d4d05a12c7280 | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
class C {
var x: int
var z: int
method M()
requires x == 6
modifies this
{
x := 10;
label 00:
label 01:
x := x + 1;
label 2:
{
label 0_2:
x := x + 1;
label 3:
assert true;
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/LegacyConversions.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,483 | cb6802d20da183b0bb76cace2ddc678429ef26a139bda123026435dab10f86de | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" -- --relax-definite-assignment --general-newtypes=false
module Chars {
type MyChar = ch: char | ch != 'b'
type Char = char
type CharSubset = ch: char | ch != 'b'
method CharConversions() returns (s: CharSubset, x: MyChar, y: Char, a: char) {... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/LetExpr.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 11,096 | b7333673e06171b6b6852156079e4db48bc1b9a03497d4cdb3df56d214850355 | // RUN: %exits-with 4 %verify --allow-deprecation --allow-axioms --relax-definite-assignment --allow-warnings --print "%t.print.dfy" "%s" > "%t"
// RUN: %resolve --allow-warnings --allow-axioms --allow-deprecation "%t.print.dfy" >> "%t"
// RUN: %diff "%s.expect" "%t"
method M0(n: int)
requires var f := 100; n <... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/LhsDuplicates.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,160 | c2bb370c69026339bb9406654910447ec62e3e35fb416052291525dddd1b56b8 | // RUN: %exits-with 4 %verify --manual-triggers "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
class MyClass<T> {
var f: T
constructor(t: T) {
f := t;
}
}
method M<T(0)>()
{
var a, b := new T[100], new T[100];
forall i | 0 <= i < 100 {
a[3] := *; // RHS is * -- this is okay
}
forall... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/LiberalEquality.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,281 | 81825df24a0d623bc213722c8a3cec2960c11fac2fdb58b949534258b5311a83 | // RUN: %exits-with 2 %verify --allow-deprecation --type-system-refresh=false --general-newtypes=false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
class Array<T>
{
var Length: nat;
}
class Test<T> {
var a: Array<int>;
var b: Array<T>;
ghost predicate valid()
reads this, a, b;
{
a != ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/LitTriggers.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,285 | ca73b3db2b0e2d25e77e9a09bff15dc6130b263ab610200c882758cb04ef3936 | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" -- --allow-deprecation
// Imported from bug 76. LitInt would be triggered on, causing matching failures.
ghost predicate P(x:int, y:int)
lemma L1(x:int, y:int)
requires y == 2;
requires forall i :: P(i, 3);
{
assert P(x, y + 1);
}
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/LoopModifies.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 6,558 | 0734d012c18487cf4f3ff357adb4dc5dce691c5dc97640e0231231c406d000e2 | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" -- --allow-deprecation
// regular modifies sanity test:
method Testing1(a: array<int>)
requires a.Length > 0;
{
a[0] := 0; // ERROR
}
// array inside while loop, without explict modifies clause:
method Testing2(a: array<int>)
requires a... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/MapMergeSubtraction.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,596 | 5ac9bb75ee10ac6d39d9b8ee09557570f79fc0e26297a107ecb85b7844a762f6 | // RUN: %exits-with 2 %build --type-system-refresh=false --general-newtypes=false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
method Simple(m: map<int, real>, n: map<int, real>, s: set<int>) returns (r: map<int, real>)
{
if
case true =>
var tmp := m + n - s;
r := tmp;
case true =>
var tmp :=... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Maps.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 16,500 | e63b999a8d9fa5814b05b9ed61ba09297f74828694a13dd5e0eff9898baaefb5 | // RUN: %exits-with 4 %verify --relax-definite-assignment --allow-deprecation "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// This method can be used to test compilation.
method Main()
{
var m := map[2:=3];
// test "in"
if(2 in m)
{
print "m0\n";
}
else
{ assert false; }
// te... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/MatchBraces.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,155 | 2c52d20fa29f9dda669dbbd55da16ce087eae465c323e0508548d860ccb744f1 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
datatype Color = Red | Green | Blue
method Main() {
M(Green, Red);
M(Blue, Blue);
}
// ----- match expressions in general positions
method M(c: Color, d: Color) {
var x := match c
case Red => 5
ca... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Matrix-OOB.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 450 | 6a15731fe2ce3ab7147303628579811d27f882508af7aab22f883c19e7584ee2 | // RUN: %exits-with 4 %verify --show-hints "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// This is a regression test: OOB errors for matrices used to be reported on the
// quantifier that introduced the variables that constituted the invalid indices.
// WISH: It would be even better to report the error on the var... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/MiscTypeInferenceTests.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,182 | 802f588ed1ee30fcc5995b965bba1a56005535cb7f5c7dbba40ec4c20b68c18e | // RUN: %exits-with 4 %build --type-system-refresh=false --general-newtypes=false "%s" --relax-definite-assignment --allow-axioms > "%t"
// RUN: %diff "%s.expect" "%t"
// All of the examples in this file should type check (but some produce
// verification errors). The examples were some of the ones used during
//... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ModifyStmt.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,872 | 61c2afeba0ea3eb73291783f0632b95b9b62025e9a05ba3cf65c64e18f76bbd7 | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
class MyClass {
var x: int
var y: int
ghost var g: int
method M(S: set<MyClass>, mc: MyClass)
requires this == mc
modifies this, S
{
if mc == this {
modify mc, this;
}
modify {this}, this, {this}, S;
m... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ModuleExport.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 6,931 | 08b76814e5af6d2bacef8204a133ac0c174776855f92a90c65e4565a939b112d | // RUN: %exits-with 2 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module A {
export A reveals f provides h
export E1 provides f reveals g
export E2 extends A, E1 reveals T
export Friend extends A reveals g, T provides T.l
export Fruit reveals Data
method h() {}
ghost function f(): int { 81... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ModuleInsertion.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,397 | 2fe06cee41dda82977845a41daa7ce84ab1c9c156ef3aba2fbb38e11a4717396 | // NONUNIFORM: Tests printing much more than compilation
// RUN: %build --print:- --no-verify "%s" > "%t"
// RUN: %run --rprint:- "%s" >> "%t"
// RUN: %diff "%s.expect" "%t"
method Main() {
Outer.Test();
XY.Test();
U.V.Test();
print MyModule.Q.W.E.R.T.Y.h, "\n";
}
// ----- Outer
module Outer {
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ModuleInsertionErrors.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 526 | 0f5ca1f36e05e66e0da4470575e72e21cd55b2d8135fc37ee2529c377914e469 | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
module A {
import B
module S {
import T
const x := T.y
}
}
module B {
}
module A.T { // this is imported by A.S above
const y := 15
}
module Duplicates {
module A {
module B { }
}
module A.B { } // error: ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Modules0.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 8,719 | 0f48f73cd54e7fa67bb1988eb3ef203ffd4431a6c781e718c4093009e1b6a031 | // RUN: %exits-with 2 %verify --allow-axioms --type-system-refresh=false --general-newtypes=false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// ---------------------- duplicate types within a module
module Wazzup {
class WazzupA { }
class WazzupA { } // error: duplicate type
datatype WazzupA = W_A_X /... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Modules1.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,458 | ebc53dc31f78c0e2fc6563a525238202480b0dd2fbd69429c2c9fe4dd3fa42f4 | // RUN: %exits-with 4 %verify --relax-definite-assignment --allow-deprecation "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module A {
import B = Babble
class X {
ghost function Fx(z: B.Z?): int
requires z != null;
decreases 5, 4, 3;
{ z.G() } // fine; this goes to a different module
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Modules2.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,644 | 0788b1a96704384c7e6e4b82de9476af9f85901664c982ea875e0c794c6d917e | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
module A {
class C {
constructor () { }
var f: int
}
datatype D = E(int) | F(int)
ghost function f(n:nat): nat
}
module B {
class C {
var f: int
}
datatype D = E(int) | F(int)
ghost function f(n:nat): nat
}
modul... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ModulesCycle.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 386 | 70a19e4f91c6f58565a97b6d3adb5b36eff8daa2ea56c5c35257115ddef53b19 | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
module V {
import t = T // error: T is not visible (and isn't even a module)
}
module A {
import B = C
}
module C {
import D = A
}
module Kevin { // error: cyclic import
module Joe {
module Nick {
import Frankie
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/MoForallCompilation.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,623 | 20589b3beb74357f872b0d2b364d79a4cb9d20be7d21a979c0ff36dd845f2422 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
method Main() {
TestAggregateArrayUpdate();
TestAggregateMultiArrayUpdate();
TestAggregateFieldUpdate();
}
// ------------------------------------------------------------
method TestAggregateArrayUpdate() {
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/MultiDimArray.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,301 | f826e8962cf11bcf224b8d3013cf432bb3b92babcade5233b7a03855374c927d | // RUN: %exits-with 4 %verify --relax-definite-assignment --allow-deprecation "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
type array1<T> = array<T> // array1 is not a pre-defined type; so we make it a synonym
class A {
// all of the following array types are allowed
var a: array<int>;
var b: array <bool>;
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/MultiSets.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 8,340 | f364ce2b083fb4f8fa57876b8752c6a86987e41396da7e1cddaa536003c86042 | // RUN: %exits-with 4 %verify --allow-deprecation --manual-triggers "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
method test1()
{
var ms: multiset<int> := multiset{1,1,1};
var ms2: multiset<int> := multiset{3};
assert 1 in ms;
assert forall i :: i != 1 ==> i !in ms; // 1 is the only thing in ms.
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NameclashesCompile.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,107 | 82be736552164d83bc3a10720512175ef009cc84a524e0992d02e6566a87f37c | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
method Main() {
var r0, r1;
var d := Ctor(15);
r0 := d.ToString();
r1 := d.GetHashCode();
print r0, " ", r1, "\n";
var c := CoCtor(15);
r0 := c.ToString();
r1 := c.GetHashCode();
print c.c, " ",... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NativeTypeResolution.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,243 | 8e2805714ec8b660f093334a22fbc103d8a66e94afa851648e5a3d56962cdec3 | // RUN: %exits-with 2 %build --show-hints --target cs "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
newtype V = x | 0 <= x < 200 // byte
newtype {:nativeType "byte"} W = x | -2 <= x < 2 // error: cannot be byte
newtype {:nativeType "int","byte"} X = x | -2 <= x < 2 // error: cannot be byte
newtype {:nativeType "... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NatTypes.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,848 | e4fed3ddb8fe16834d08bf35f21973a1fabb22469a9493d8d286666fcf4e887b | // RUN: %exits-with 4 %verify --relax-definite-assignment "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
method M(n: nat) {
assert 0 <= n;
}
method Main() {
M(25);
M(-25); // error: cannot pass -25 as a nat
}
class MyClass {
var f: nat
method CheckField(x: nat, y: int)
requires 0 <= y
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NestedMatch.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,613 | a8e0ec87ad267e2aaaed5701d4c055f371a1c233b932f458f2daf55acee82802 | // RUN: %exits-with 4 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module NestedMatch {
datatype Nat = Zero | Suc(Nat)
ghost predicate Even(n: Nat)
{
match n
case Zero => true
case Suc(Zero) => false
case Suc(Suc(p)) => Even(p)
}
method checkEven(n: Nat) {
assert ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NestedPatterns.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,841 | 74116a4c3fdb5849d23e530a7d47030403bb3d2c1c2b6414e27a57d6d72af5aa | // RUN: %testDafnyForEachResolver --expect-exit-code 2 "%s"
datatype List<T> = Nil | Cons(head: T, tail: List<T>)
method MethodA<T>(xs: List<T>) returns (ys: List<T>)
{
match xs
case Nil =>
ys := Nil;
case Cons(h, Nil) =>
ys := Nil;
case Cons(h, Cons(h', tt)) =>
ys := tt;
}
metho... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NestedPatternsA.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 758 | 7642fc1956d6808676c44ecfe0257dd3d8cfdd275a9a6cef7717c13f64a4e9da | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
datatype List<T> = Nil | Cons(head: T, tail: List<T>)
method BadParens0(xs: List)
{
match xs
case (Nil) => // error: parentheses are not allowed around a pattern
case (Cons(h, t)) => // error: parentheses are not allowed around a pattern
}
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Newtypes.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 9,609 | a697225cf0c3f7c24644c93d007708469251fb0feaf4d0fc0df873f2a086878b | // RUN: %exits-with 4 %build "%s" --relax-definite-assignment > "%t"
// RUN: %diff "%s.expect" "%t"
newtype int32 = int
newtype posReal = real
newtype int8 = int32
method M()
{
var k8 := new int8[100];
var s: set<int32>;
var x: posReal;
var y: posReal;
var yOrig := y;
var z: int32;
x := 5... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NewtypesResolution.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 12,683 | 791bfafba3fe6449598b1c80335a39cb40eea6e5bc13fcee30a7535a51cd28d3 | // RUN: %exits-with 2 %verify --allow-deprecation --type-system-refresh=false --general-newtypes=false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module Cycle {
type MySynonym = MyNewType // error: a cycle
newtype MyNewType = MyIntegerType_WellSupposedly
type MyIntegerType_WellSupposedly = MySynonym
}
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NoMoreAssume2Less2.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,523 | 5944ece9b8b96d5eb6364ed60de8756fac4d1c422c5961977b563e96f6fd85f6 | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
// This file tests various ways of writing the equivalent of "assume false;" or "assert false;" inside a loop.
// It used to be that Dafny's translation of such statements into Boogie could cause Boogie to cut off the
// loop back edge, which would turn... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NonGhostQuantifiers.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 6,656 | 13c15a2211d1b319cfcea91f0d57f2974f6adf591b5090f1b6632fd101cdf270 | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
// This file contains various tests of resolving quantifiers in ghost and non-ghost positions
module Misc {
class MyClass<T> {
// This function is in a ghost context, so all is cool.
ghost function GhostF(): bool
{
forall n :: 2 <= n ==> (... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NonZeroInitialization.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,628 | 7aa1503922508708482287b6ba939d540445702025ecffc2ba25bd3a9779eb1c | // RUN: %exits-with 4 %verify --relax-definite-assignment "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
type MyInt_Bad = x | 6 <= x witness 5 // error: witness does not satisfy constraint
type MyInt = x | 6 <= x witness 6
newtype MyNewInt = x | 6 <= x witness 6
type Six = x | 6 <= x witness 6
type SixAgain ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NonZeroInitializationCompile.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,071 | 36578d58c04e93280ab3c3705baa8cd86fc2254a0f5d5a90654613116121e992 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
type MyInt = x | 6 <= x witness 6
newtype MyNewInt = x | 6 <= x witness 12
newtype short = x | -0x8000 <= x < 0x8000
newtype short' = x | -0x8000 <= x < 0x8000 witness -35
newtype FavoriateReals = r | r == 3.14 || r =... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NoReferencesVerification.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,249 | 9a6121aaf2445ca0389a3a5e1a57636bc51ec8ba849202de677857b8588ede4b | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
// Test that it is known that a value of a (!new) type is allocated in every state.
class C { }
type Y(!new)
type Z(!new)<A, B(!new)>
twostate lemma R<X(!new)>(new c: C, new x: X, new y: Y, new z: Z<object, int>, new i: int) {
assert allocated(... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NoTypeArgs.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,043 | 8323702ad6dc9001ea5147ce10d65d7829db28d4be7e33b7f4689023a9cd4751 | // RUN: %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
datatype List<T> = Nil | Cons(hd: T, tl: List)
method M0() {
var l: List;
l := Cons(5, Nil);
assert l.hd == 5;
var k: MyClass<bool>;
k := new MyClass;
k.data := false;
var h := new MyClass;
h.data := false;
var y := new M... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/NullComparisonWarnings.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,340 | 0a30b10d27fbb5adb33f75ed6c4bf349853d27d25c7d94b4b67698c82f74df4a | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --allow-warnings --relax-definite-assignment
method Main() {
print "despite the warnings, the program still compiles\n";
var c := new MyClass();
M(c, c, 0, {});
}
class MyClass {
var next: MyClass
constructor () {
next := this;... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/OlderResolution.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 515 | 5ddd0ec28dda14a62222b16f10027190908bdfb5de7e802a7097db5642664559 | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
ghost function F0(older x: int): int // error: only predicates support 'older' parameters
twostate function F1(older x: int): int // error: only predicates support 'older' parameters
ghost function G0(older x: int): bool
ghost predicate G1(older x: i... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/OlderVerification.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 7,665 | 303b0ddde691b0c2c1bb928284edf0d0c987cd6de6c8729c5dae79d6864cb642 | // RUN: %exits-with 4 %verify --type-system-refresh=false --general-newtypes=false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// ----------------------------------
ghost predicate Trivial0(older x: int, s: set<int>) {
true
}
ghost predicate Trivial1(older x: int, s: set<int>) {
x in s
}
ghost predi... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/OnDemandResolutionCycle.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 496 | f5ed85b61d83efd73879db0f5bec28dd935a5bd1b22a2e3ed941bac173aeaab2 | // RUN: %exits-with 2 %verify --type-system-refresh "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
type A = x | x == a // error: cycle
const a: A := 2
type B = x | x == FB() // error: cycle
const b := FB()
function FB(): B
const c0 := c1 // error: cycle
const c1 := c0
newtype D = x | x == d // error: cycle... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/OnDemandResolutionOrdering.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,441 | 2a21a38608add5cd00034ac2c4e549a0fdb3072535d559dc262ba859f62228c0 | // RUN: %verify --relax-definite-assignment --type-system-refresh "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
method Str(s: string) {
var t := s;
}
class Class<XX> {
}
method MC(c: Class<real>) {
var d: Class := c;
}
type Synonym<A, Unused> = seq<A>
method SM(x: Synonym<int, real>, y: seq<bool>)... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/one-message-per-failed-precondition.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 408 | d2b42dd2d3bc947e9604d0bfb3c38e7e3053bfb23d9ba1a00e512fcf88400d93 | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
// When a function call violates two preconditions at the same time, it causes
// two errors to be reported for the same token
method A(x: int)
requires x > 0
requires x < 0
{}
method B(x: int) {
A(x);
}
ghost function fA(x: int): int... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/OpaqueConstants.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,670 | 5bbc9e6defb1912dc6881a9e67c87289bc055e95a888752b16c7b84db65fcd9e | // RUN: %exits-with 4 %verify --allow-axioms "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module Module {
module M {
const {:opaque} Five := 5
}
method Test() {
if * {
assert M.Five == 5; // error: this is not known here
} else {
reveal M.Five;
assert M.Five == 5;
}... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/OpaqueFunctions.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 8,490 | 735e82fe3504f410f79e4e6fc41d720c434660efd9811e995b59a4e2b67558a1 | // RUN: %exits-with 4 %verify --allow-deprecation --allow-axioms "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module A {
export NotSoMuch
reveals C, C.RevealedValid
provides C.Valid, C.Get, C.M, C.x
export More extends NotSoMuch
reveals C.Get
class C {
var x: int;
ghost predicate... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/OpaqueTypeWithMembers.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,495 | 4b0a1feb9e5f5ee3d5eb1c34577b52651b8d45e3161ef4180496537287183bc8 | // RUN: %exits-with 4 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
type Opaque {
const y: int
const z := 25
ghost function F(): int { z }
method G(a: int) returns (b: int) { b := a + this.y; }
lemma LemmaF25(n: nat)
ensures z == 25
{
var zz := z + y;
assert zz - y == 25;
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/OpaqueTypeWithMembersE.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 493 | f1d9630568782def1f7ecbf7db66143e0beadd55e923485af2e291ba6f8ecf90 | // RUN: %verify --relax-definite-assignment "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
type FailureCompatible(0) {
const c: int
predicate IsFailure() { c < 10 }
function PropagateFailure(): int
requires IsFailure()
{
100 / (c - 10)
}
function Extract(): real
requires !IsFailure()
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ParameterResolution.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 15,894 | a6cfcb90b3ecea145f2d84ea49a314076869e637d668eb467db21b9093780ead | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s" -- --allow-axioms
module Actuals {
function F(x: int, y: int, z: int): int
method M0() {
var a0 := F(2, 3, 5);
var a1 := F(2, y := 3, z := 5);
var a2 := F(2, z := 5, y := 3);
var a3 := F(x := 2, y := 3, z := 5);
var a4 := ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ParseErrors.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 11,283 | 728c68158b58c0d0cc3db48b2246e7230dee8ad607bb7ab76d9a777498897d89 | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s" -- --allow-deprecation
// ---------------------- chaining operators -----------------------------------
method TestChaining0(j: int, k: int, m: int)
requires j != k != m; // error: cannot have more than one != per chain
requires j == k == m; //... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/ParserOptions.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,090 | 108ec6f151bebf5128aa402e6d7d02cdad435f4d465f4d205152add807a9aae3 | // RUN: %testDafnyForEachResolver "%s"
// This module tests support for the `:options` attribute
// Use legacy syntax
module {:options "/functionSyntax:3"} FunctionMethodSyntax {
function method CompiledFunction() : int { 1 }
function GhostFunction() : int { 1 }
}
// Use new syntax
module {:options ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/PrecedenceLinter.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 12,345 | 45bbf54132dbe485d75688c752012c3ccd4759c1f8cd2033f27f8b779e84935d | // RUN: %resolve "%s" --allow-warnings > "%t"
// RUN: %resolve "%s" --allow-warnings --ignore-indentation >> "%t"
// RUN: %diff "%s.expect" "%t"
ghost predicate P0(A: bool, B: bool, C: bool) {
A &&
B ==> C // warning: suspicious lack of parentheses (lhs of ==>)
}
ghost predicate P1(A: bool, B: bool, C: boo... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/PredExpr.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,877 | 01e05605730c43e5de53303f7463411800daec9d0f565108bb3c379909b3d179 | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
ghost function SimpleAssert(n: int): int
ensures n < 100
{
assert n == 58; // error: assert violation
n // but postcondition is fine
}
ghost function SimpleAssume(n: int): int
ensures n < 100
{
assume n == 58; n // all is fine
}
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/Predicates.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,476 | b40a70a4b8a5a7196e0aa1dd5fce433c55d0965b601ef61d83dcd49068df2bfa | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
// ------------------------------------------------
abstract module Loose {
class MyNumber {
var N: int
ghost var Repr: set<object>
ghost predicate Valid()
reads this, Repr
{
this in Repr &&
0 <= N &&
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/PrefixSyntax.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,481 | 9e90cdcb144e0deca262790092658aebb417c08e4c65b3bd678e10d4fc88c1fa | // RUN: %testDafnyForEachResolver "%s"
datatype TextProcessing =
| TeX // prefix |
| LaTeX
| Madoko
ghost predicate InfixStyle(x: int, y: int, t: TextProcessing)
{
(t == TeX ==> x < y) &&
(t == LaTeX || t == TeX ==> x == 100 && y == 1000) &&
(t == Madoko ==> 0 <= x || 0 <= y)
}
ghost p... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/PrefixTypeSubst.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,078 | 8993ac43770244f39edd178ed8cd709d90ae4f1c2b5eee9bf138c94dcdfd34d8 | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" -- --rprint:-
class MyClass<A,B> {
greatest predicate P<X,Y>(x: X, y: Y)
{
P(x, y)
}
greatest predicate R<T>()
{
R<T>()
}
static greatest predicate S<Q>()
{
S<Q>()
}
static greatest predicate RST<QQ>()
{
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/PrettyPrinting.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 5,687 | 3eaa8a6059c7ee8277f7f81a568424955f7f18ebc7b1dde34f64f3e43ec924b0 | // RUN: %exits-with 2 %build --print:- --no-verify "%s" > "%t"
// RUN: %exits-with 2 %build --print:- --no-verify --type-system-refresh "%s" > "%t.refresh"
// RUN: %diff "%s.expect" "%t"
// RUN: %diff "%s.expect" "%t.refresh"
module A {
method M()
}
module B refines A {
method M ... {
while true
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafny0/PrintEffects.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,818 | 69db0c310248501dda7bde8014ed53e0c1f77119b793d130c8a0605ee4564a58 | // NONUNIFORM: Multiple testing scenarios (could be split)
// RUN: %baredafny run %args "%s" > "%t"
// RUN: ! %baredafny run %args --track-print-effects "%s" >> "%t"
// RUN: %diff "%s.expect" "%t"
method Main() {
print "hello, Main\n"; // error: cannot print from this method
P(); // error: cannot call pri... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.