-
Notifications
You must be signed in to change notification settings - Fork 399
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(gnovm): correct filetest directive behavior (#3697)
The test result is misleading. Without an output directive set, the current logic does not provide a prompt even when actual output occurs. ```go package main func main() { println("ok") } // Error: // panic xxx ``` ## before fix: === RUN TestFiles === PAUSE TestFiles === CONT TestFiles === RUN TestFiles/a111.gno --- PASS: TestFiles (0.14s) --- PASS: TestFiles/a111.gno (0.01s) PASS ok command-line-arguments 1.619s ## after fix: === RUN TestFiles === PAUSE TestFiles === CONT TestFiles === RUN TestFiles/a111.gno files_test.go:92: unexpected output: ok --- FAIL: TestFiles (0.13s) --- FAIL: TestFiles/a111.gno (0.01s) FAIL FAIL command-line-arguments 1.479s FAIL --------- Co-authored-by: Morgan <[email protected]>
- Loading branch information
1 parent
29c3ee6
commit ce6a4aa
Showing
4 changed files
with
13 additions
and
2 deletions.
There are no files selected for viewing
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
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 |
---|---|---|
|
@@ -9,3 +9,6 @@ func main() { | |
le := &binary.LittleEndian | ||
println(&le.AppendUint16(b, 0)[0]) | ||
} | ||
|
||
// Output: | ||
// &(0 <databyte> uint8) |
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
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 |
---|---|---|
|
@@ -14,6 +14,8 @@ func main() { | |
|
||
} | ||
|
||
// Output: | ||
// true | ||
// true | ||
// true | ||
// true | ||
|