Closed grepsuzette closed 1 year ago
The panic advertised at gno/pkgs/gnolang/machine.go:340 is this one
func (m *Machine) runFiles(fns ...*FileNode) {
// Files' package names must match the machine's active one.
// if there is one.
for _, fn := range fns {
if fn.PkgName != "" && fn.PkgName != m.Package.PkgName {
panic(fmt.Sprintf("expected package name [%s] but got [%s]",
m.Package.PkgName, fn.PkgName))
}
}
The message never shows through.
--
Addendum: Looks like one does not use a _filetest
like I did but with a main
instead:
// PKGPATH: gno.land/r/boards_test
package boards_test
func main() {}
Still same outout with -verbose
.
I'll go on investigating.
It was me who didn't understandj what a filetest was and how to use it. Closing this, sorry.
(posting this as a separate issue, but related to #481. Edit: only related because it makes #481 important to fix)
If I use
_filetest
, gnodev test pass, even when it's supposed to fail (t.Fail()).Apparent cause: It in fact panics internally, but regardless of whether tests are supposed to fail, it will always pass (it likely recovers too optimistically, bug 2, where the cause of the panic is bug 1).
One example could be this:
Or that:
Whatever, it will always pass.
Without -verbose, e.g.
gnodev test -root-dir ./gno .
:With
-verbose
: