Skip to content

Commit

Permalink
Fresh binaries, fix test (take my own nag test’s suggestion :)
Browse files Browse the repository at this point in the history
  • Loading branch information
robin-aws committed Nov 16, 2023
1 parent 19424a5 commit c0623b9
Show file tree
Hide file tree
Showing 12 changed files with 4 additions and 41 deletions.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,29 +1,10 @@
// This test just asserts what happens when you try to use a library
// that isn't available for all backends.
// that isn't available for all backends (see .check files).
// Full testing of such libraries is handled in the DafnyStandardLibraries
// project rather than here.

// Valid:

// RUN: %verify --standard-libraries:true "%s" > "%t"
// RUN: %run --target:cs --standard-libraries:true "%s" >> "%t"
// RUN: %run --target:java --standard-libraries:true "%s" >> "%t"
// RUN: %run --target:go --standard-libraries:true "%s" >> "%t"
// RUN: %run --target:js --standard-libraries:true "%s" >> "%t"
// RUN: %run --target:py --standard-libraries:true "%s" >> "%t"

// Invalid:

// RUN: %exits-with 2 %run --target:cpp --standard-libraries:true "%s" >> "%t"
// RUN: %exits-with 2 %run --target:rs --standard-libraries:true "%s" >> "%t"

// RUN: %diff "%s.expect" "%t"
// RUN: %testDafnyForEachCompiler "%s" -- --standard-libraries:true

module UsesFileIO {

import DafnyStdLibs.FileIO

method Main() {
var thisFile :- expect FileIO.ReadBytesFromFile("StandardLibraries_TargetSpecific.dfy");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHECK-L: StandardLibraries_TargetSpecific.dfy(9,22): Error: module FileIO does not exist (position 1 in path DafnyStdLibs.FileIO)
Original file line number Diff line number Diff line change
@@ -1,20 +0,0 @@

Dafny program verifier finished with 1 verified, 0 errors

Dafny program verifier finished with 1 verified, 0 errors

Dafny program verifier finished with 1 verified, 0 errors

Dafny program verifier finished with 1 verified, 0 errors

Dafny program verifier finished with 1 verified, 0 errors

Dafny program verifier finished with 1 verified, 0 errors
StandardLibraries_TargetSpecific.dfy(24,22): Error: module FileIO does not exist (position 1 in path DafnyStdLibs.FileIO)
StandardLibraries_TargetSpecific.dfy(27,34): Error: unresolved identifier: ReadBytesFromFile
StandardLibraries_TargetSpecific.dfy(27,17): Error: The type of the first expression to the right of ':-' could not be determined to be a failure type (got '?')
3 resolution/type errors detected in the_program
StandardLibraries_TargetSpecific.dfy(24,22): Error: module FileIO does not exist (position 1 in path DafnyStdLibs.FileIO)
StandardLibraries_TargetSpecific.dfy(27,34): Error: unresolved identifier: ReadBytesFromFile
StandardLibraries_TargetSpecific.dfy(27,17): Error: The type of the first expression to the right of ':-' could not be determined to be a failure type (got '?')
3 resolution/type errors detected in the_program
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CHECK-L: StandardLibraries_TargetSpecific.dfy(9,22): Error: module FileIO does not exist (position 1 in path DafnyStdLibs.FileIO)

0 comments on commit c0623b9

Please sign in to comment.