-
Notifications
You must be signed in to change notification settings - Fork 261
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add explicit test of published dafny-lang/DafnyRuntimeGo
- Loading branch information
Showing
4 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
Source/IntegrationTests/TestFiles/LitTests/LitTest/gomodule/publishedruntime/go.mod
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module GoModule1 | ||
|
||
go 1.21 | ||
|
||
require github.com/dafny-lang/DafnyRuntimeGo/v4 v4.8.0 |
2 changes: 2 additions & 0 deletions
2
Source/IntegrationTests/TestFiles/LitTests/LitTest/gomodule/publishedruntime/go.sum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
github.com/dafny-lang/DafnyRuntimeGo/v4 v4.8.0 h1:ttdCpTQKspK9A/tqE1qnipvjp9IrURS1kC2w47we6GM= | ||
github.com/dafny-lang/DafnyRuntimeGo/v4 v4.8.0/go.mod h1:l2Tm4N2DKuq3ljONC2vOATeM9PUpXbIc8SgXdwwqEto= |
20 changes: 20 additions & 0 deletions
20
Source/IntegrationTests/TestFiles/LitTests/LitTest/gomodule/publishedruntime/helloworld.dfy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// This test consciously depends on the published version of the Go runtime | ||
// at https://github.com/dafny-lang/DafnyRuntimeGo/v4, | ||
// to ensure that copy works correctly. | ||
// The other tests use `replace` directives to test against the local copy. | ||
// That means if this test fails at some point because Dafny changes | ||
// its compilation output, it may be necessary to | ||
// publish a new tag on dafny-lang/DafnyRuntimeGo first before | ||
// this test can pass, much less a new version of Dafny released. | ||
|
||
// RUN: %baredafny translate go --go-module-name=GoModule1 "%s" --output "%S/test" | ||
// RUN: %cp -rf "%S/go.mod" "%S/test-go/go.mod" | ||
// RUN: %cp -rf "%S/go.sum" "%S/test-go/go.sum" | ||
// RUN: go run -C %S/test-go/ test.go > %t | ||
// RUN: %diff "%s.expect" "%t" | ||
module DafnyModule1 { | ||
|
||
method Main() { | ||
print "Hello World"; | ||
} | ||
} |
1 change: 1 addition & 0 deletions
1
...tegrationTests/TestFiles/LitTests/LitTest/gomodule/publishedruntime/helloworld.dfy.expect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Hello World |