-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gnovm: add consistency between testfiles instructions and -update-golden-tests
flag
#1015
Labels
Milestone
Comments
tbruyelle
added
📦 🤖 gnovm
Issues or PRs gnovm related
🌟 improvement
performance improvements, refactors ...
labels
Aug 1, 2023
7 tasks
tbruyelle
added a commit
to tbruyelle/gno
that referenced
this issue
Aug 3, 2023
Add tests for Output, Error and Realm instructions The change introduces a new test dependency github.com/rogpeppe/go-internal/testscripts, which allows to create tests bases on txtar files. This is very handy for this kind of tests, because: - you can easily creates a set of files that can be used for a command (here the `gno test` command) - you can assert stderr and stdout expectations in a very readable and maintainable way - you can compare files using the `cmp` command, which is very useful to assert of the `-update-golden-tests` behavior. These tests were added to help work on gnolang#1015, which will potentially alter the behavior of "*filetest.gno" instructions updates.
tbruyelle
added a commit
to tbruyelle/gno
that referenced
this issue
Aug 3, 2023
Add tests for Output, Error and Realm instructions The change introduces a new test dependency github.com/rogpeppe/go-internal/testscripts, which allows to create tests bases on txtar files. This is very handy for this kind of tests, because: - you can easily creates a set of files that can be used for a command (here the `gno test` command) - you can assert stderr and stdout expectations in a very readable and maintainable way - you can compare files using the `cmp` command, which is very useful to assert of the `-update-golden-tests` behavior. These tests were added to help work on gnolang#1015, which will potentially alter the behavior of "*filetest.gno" instructions updates.
7 tasks
tbruyelle
added a commit
to tbruyelle/gno
that referenced
this issue
Aug 3, 2023
Add tests for Output, Error and Realm instructions The change introduces a new test dependency github.com/rogpeppe/go-internal/testscripts, which allows to create tests bases on txtar files. This is very handy for this kind of tests, because: - you can easily creates a set of files that can be used for a command (here the `gno test` command) - you can assert stderr and stdout expectations in a very readable and maintainable way - you can compare files using the `cmp` command, which is very useful to assert of the `-update-golden-tests` behavior. These tests were added to help work on gnolang#1015, which will potentially alter the behavior of "*filetest.gno" instructions updates.
tbruyelle
added a commit
to tbruyelle/gno
that referenced
this issue
Aug 4, 2023
Add tests for Output, Error and Realm instructions The change introduces a new test dependency github.com/rogpeppe/go-internal/testscripts, which allows to create tests bases on txtar files. This is very handy for this kind of tests, because: - you can easily creates a set of files that can be used for a command (here the `gno test` command) - you can assert stderr and stdout expectations in a very readable and maintainable way - you can compare files using the `cmp` command, which is very useful to assert of the `-update-golden-tests` behavior. These tests were added to help work on gnolang#1015, which will potentially alter the behavior of "*filetest.gno" instructions updates.
tbruyelle
added a commit
to tbruyelle/gno
that referenced
this issue
Aug 11, 2023
Add tests for Output, Error and Realm instructions The change introduces a new test dependency github.com/rogpeppe/go-internal/testscripts, which allows to create tests bases on txtar files. This is very handy for this kind of tests, because: - you can easily creates a set of files that can be used for a command (here the `gno test` command) - you can assert stderr and stdout expectations in a very readable and maintainable way - you can compare files using the `cmp` command, which is very useful to assert of the `-update-golden-tests` behavior. These tests were added to help work on gnolang#1015, which will potentially alter the behavior of "*filetest.gno" instructions updates.
thehowl
changed the title
Gnovm: add consistency between testfiles instructions and
Gnovm: add consistency between testfiles instructions and Aug 17, 2023
-update-golden-test
flag-update-golden-tests
flag
moul
moved this from 🌟 Wanted for Launch
to 🔵 Not Needed for Launch
in 🚀 The Launch [DEPRECATED]
Sep 5, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Originated from #1010 (comment)
Description
When
gno test -update-golden-test
is executed for "*_filetest.gno" files, it writes the stdout below the// Output:
instructions, and the content of the store below the// Realm:
instruction.For the
// Error:
instruction on the other hand, surprisingly, this doesn't work the same way. The-update-golden-test
has no effect on the// Error:
instruction. To fill it regarding the actual error, you have to write the// Error:
instruction but without any following content. In that case, it will be filled with the actual error, with an additional messageAs @moul suggested, we need to add consistency over that, the better way is probably to replace the
// Error:
behavior which looks like an exception, with a behavior governed by theupdate-golden-test
flag.The text was updated successfully, but these errors were encountered: