-
Notifications
You must be signed in to change notification settings - Fork 375
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
cd examples; make test fails #782
Labels
🐞 bug
Something isn't working
Comments
should be the case, we'll fix it. |
fixes for the first two cases... --- a/examples/gno.land/r/demo/releases_example/releases1_filetest.gno
+++ b/examples/gno.land/r/demo/releases_example/releases1_filetest.gno
@@ -1,7 +1,7 @@
package main
import (
- "gno.land/r/demo/releases-example"
+ "gno.land/r/demo/releases_example"
)
func main() {
@@ -17,18 +17,18 @@ func main() {
// Output:
// -----------
-// # example-app
+// # example_app
//
-// ## [example-app v2 (latest)](r/demo/examples_example_v2)
+// ## [example_app v2 (latest)](r/demo/examples_example_v2)
//
// various improvements
//
-// ## [example-app v1](r/demo/examples_example_v1)
+// ## [example_app v1](r/demo/examples_example_v1)
//
// initial release
//
// -----------
-// ## [example-app v1](r/demo/examples_example_v1)
+// ## [example_app v1](r/demo/examples_example_v1)
//
// initial release
//
diff --git a/gnovm/tests/imports.go b/gnovm/tests/imports.go
index 63ccd088..7999160d 100644
--- a/gnovm/tests/imports.go
+++ b/gnovm/tests/imports.go
@@ -457,12 +457,19 @@ func testPackageInjector(store gno.Store, pn *gno.PackageNode) {
// Also inject stdlibs native functions.
stdlibs.InjectPackage(store, pn)
isOriginCall := func(m *gno.Machine) bool {
- switch m.Frames[0].Func.Name {
+ tname := m.Frames[0].Func.Name
+ switch tname {
case "main": // test is a _filetest
return len(m.Frames) == 3
case "runtest": // test is a _test
return len(m.Frames) == 7
}
+ // support init() in _filetest
+ // XXX do we need to distinguish from 'runtest'/_test?
+ // XXX pretty hacky even if not.
+ if strings.HasPrefix(string(tname), "init.") {
+ return len(m.Frames) == 3
+ }
panic("unable to determine if test is a _test or a _filetest")
}
// Test specific injections: |
I'm on the CI thing on my side. Edit: #784 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fails with the following error:
all the example tests should run on CI, not sure why it isn't.
The text was updated successfully, but these errors were encountered: