Skip to content
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

fix: In TestGnoDoc, fix expected output for "doc", "avl" #1301

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

jefft0
Copy link
Contributor

@jefft0 jefft0 commented Oct 26, 2023

In the root folder, make test has one failure: FAIL: TestGnoDoc/doc_avl (0.01s) . This is a failure of this test which expects "func NewNode". However in folder gnovm/cmd/gno, go run . doc avl prints:

package avl // import "gno.land/p/demo/avl"

type MutTree struct{ ... }
    func NewMutTree() *MutTree
type Tree struct{ ... }
    func NewTree(key string, value interface{}) *Tree

Therefore, this PR changes the test to expect "func NewTree". With this fix, make test passes.

(Of course, maybe go run . doc avl really should have "func NewNode". But I'm assuming that there was an update after the test was written.)

Signed-off-by: Jeff Thompson <jeff@thefirst.org>
@jefft0 jefft0 requested a review from a team as a code owner October 26, 2023 11:48
@github-actions github-actions bot added the 📦 🤖 gnovm Issues or PRs gnovm related label Oct 26, 2023
@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (eb42157) 47.90% compared to head (5c61757) 47.90%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1301   +/-   ##
=======================================
  Coverage   47.90%   47.90%           
=======================================
  Files         372      372           
  Lines       62990    62990           
=======================================
  Hits        30177    30177           
- Misses      30352    30354    +2     
+ Partials     2461     2459    -2     

see 5 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@thehowl
Copy link
Member

thehowl commented Oct 26, 2023

Therefore, this PR changes the test to expect "func NewTree". With this fix, make test passes.

Yes, you're right. The issue is that gno doc is for some reason loading from the mod cache first, and then from the examples folder (which contains the up-to-date avl).

I've made a note to fix the root issue; in the meantime I'll merge this so that make test is fixed (many other people in the core team had the same problem)

Thanks!

@thehowl thehowl merged commit ccba538 into gnolang:master Oct 26, 2023
183 checks passed
gfanton pushed a commit to gfanton/gno that referenced this pull request Nov 9, 2023
In the root folder, `make test` has one failure: `FAIL:
TestGnoDoc/doc_avl (0.01s)` . This is a failure of [this
test](https://github.com/gnolang/gno/blob/eb421578ec72d70d2cbd930576856623376f2daa/gnovm/cmd/gno/doc_test.go#L12-L13)
which expects "func NewNode". However in folder gnovm/cmd/gno, `go run .
doc avl` prints:

```
package avl // import "gno.land/p/demo/avl"

type MutTree struct{ ... }
    func NewMutTree() *MutTree
type Tree struct{ ... }
    func NewTree(key string, value interface{}) *Tree
```

Therefore, this PR changes the test to expect "func NewTree". With this
fix, `make test` passes.

(Of course, maybe `go run . doc avl` really should have "func NewNode".
But I'm assuming that there was an update after the test was written.)

Signed-off-by: Jeff Thompson <jeff@thefirst.org>
moul pushed a commit to moul/gno that referenced this pull request Nov 14, 2023
In the root folder, `make test` has one failure: `FAIL:
TestGnoDoc/doc_avl (0.01s)` . This is a failure of [this
test](https://github.com/gnolang/gno/blob/eb421578ec72d70d2cbd930576856623376f2daa/gnovm/cmd/gno/doc_test.go#L12-L13)
which expects "func NewNode". However in folder gnovm/cmd/gno, `go run .
doc avl` prints:

```
package avl // import "gno.land/p/demo/avl"

type MutTree struct{ ... }
    func NewMutTree() *MutTree
type Tree struct{ ... }
    func NewTree(key string, value interface{}) *Tree
```

Therefore, this PR changes the test to expect "func NewTree". With this
fix, `make test` passes.

(Of course, maybe `go run . doc avl` really should have "func NewNode".
But I'm assuming that there was an update after the test was written.)

Signed-off-by: Jeff Thompson <jeff@thefirst.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🤖 gnovm Issues or PRs gnovm related
Projects
Status: No status
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants