Skip to content

Commit

Permalink
better doc
Browse files Browse the repository at this point in the history
  • Loading branch information
thehowl committed Nov 25, 2024
1 parent 9f128d5 commit 2e1b5df
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 1 addition & 3 deletions gnovm/cmd/gno/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,7 @@ func execTest(cfg *testCfg, args []string, io commands.IO) error {
return fmt.Errorf("list sub packages: %w", err)
}

// Set-up testStore.
// Use a proxyWriter for stdout so that filetests can plug in a writer when
// necessary.
// Set up options to run tests.
stdout := goio.Discard
if cfg.verbose {
stdout = io.Out()
Expand Down
12 changes: 7 additions & 5 deletions gnovm/pkg/test/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,13 @@ func (p *proxyWriter) tee(w io.Writer) (revert func()) {
}
}

func Test(
memPkg *gnovm.MemPackage,
fsDir string, // directory on filesystem of package; used for Sync
opts *TestOptions,
) error {
// Test runs tests on the specified memPkg.
// fsDir is the directory on filesystem of package; it's used in case opts.Sync
// is enabled, and points to the directory where the files are contained if they
// are to be updated.
// opts is a required set of options, which is often shared among different
// tests; you can use [NewTestOptions] for a common base configuration.
func Test(memPkg *gnovm.MemPackage, fsDir string, opts *TestOptions) error {
opts.outWriter.w = opts.Output

var errs error
Expand Down

0 comments on commit 2e1b5df

Please sign in to comment.