Skip to content

Commit

Permalink
fix: in TestGnoDoc, fix expected output for gno doc avl (gnolang#1301)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jefft0 authored and moul committed Nov 14, 2023
1 parent 6ebce88 commit 7551728
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gnovm/cmd/gno/doc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ func TestGnoDoc(t *testing.T) {
},
{
args: []string{"doc", "avl"},
stdoutShouldContain: "func NewNode",
stdoutShouldContain: "func NewTree",
},
{
args: []string{"doc", "-u", "avl.Node"},
Expand Down

0 comments on commit 7551728

Please sign in to comment.