-
Notifications
You must be signed in to change notification settings - Fork 45
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
test: ExampleNamespacedMerkleTree #203
Conversation
Codecov Report
@@ Coverage Diff @@
## master #203 +/- ##
=======================================
Coverage 95.40% 95.40%
=======================================
Files 5 5
Lines 566 566
=======================================
Hits 540 540
Misses 15 15
Partials 11 11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for converting it to a test, I suggest keeping it.
[question] What changes made the test pass? why it was failing?
The example started failing in https://github.com/celestiaorg/nmt/actions/runs/5092193098/jobs/9153228914?pr=202#step:7:551 because the text output for the The example wanted this text output: Lines 107 to 110 in 9efc9bf
and instead it got:
The changes in this PR make the example a test which use explicit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Previously the function
ExampleNamespacedMerkleTree
existed in nmt_test.go. AFAIK Go only runs unit tests for functions with the nameTest*
so I wouldn't expectExampleNamespacedMerkleTree
to run by the Go test runner. But it is run and fails here.This PR converts the example into a test. Defer to @staheri14 if it should be deleted instead.