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

test(gno.land): add unit tests for sdk/vm.vmHandler #2459

Merged
merged 18 commits into from
Oct 30, 2024

Conversation

moul
Copy link
Member

@moul moul commented Jun 28, 2024

gnome$ go test -v ./sdk/vm -run TestVmHandler
=== RUN   TestVmHandlerQuery_Eval
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.Echo("hello")
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.PubString
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.ConstString
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.pvString
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.counter
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.GetCounter()
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.Inc()
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.pvEcho("hello")
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.1337
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.13.37
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.float64(1337)
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.myStructInst
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.myStructInst.Foo()
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.myStruct
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.Inc
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.fn()("hi")
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.sl
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.sl[1]
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.println(1234)
1234
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.doesnotexist
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/doesnotexist.Foo
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.Panic()
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.panic("bar")
=== RUN   TestVmHandlerQuery_Eval/gno.land/r/hello.sl[6]
--- PASS: TestVmHandlerQuery_Eval (0.03s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.Echo("hello") (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.PubString (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.ConstString (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.pvString (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.counter (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.GetCounter() (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.Inc() (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.pvEcho("hello") (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.1337 (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.13.37 (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.float64(1337) (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.myStructInst (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.myStructInst.Foo() (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.myStruct (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.Inc (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.fn()("hi") (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.sl (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.sl[1] (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.println(1234) (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.doesnotexist (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/doesnotexist.Foo (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.Panic() (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.panic("bar") (0.00s)
    --- PASS: TestVmHandlerQuery_Eval/gno.land/r/hello.sl[6] (0.00s)
=== RUN   TestVmHandlerQuery_Funcs
=== RUN   TestVmHandlerQuery_Funcs/gno.land/r/hello
=== RUN   TestVmHandlerQuery_Funcs/gno.land/r/doesnotexist
=== RUN   TestVmHandlerQuery_Funcs/std
=== RUN   TestVmHandlerQuery_Funcs/strings
--- PASS: TestVmHandlerQuery_Funcs (0.00s)
    --- PASS: TestVmHandlerQuery_Funcs/gno.land/r/hello (0.00s)
    --- PASS: TestVmHandlerQuery_Funcs/gno.land/r/doesnotexist (0.00s)
    --- PASS: TestVmHandlerQuery_Funcs/std (0.00s)
    --- PASS: TestVmHandlerQuery_Funcs/strings (0.00s)
=== RUN   TestVmHandlerQuery_File
=== RUN   TestVmHandlerQuery_File/gno.land/r/hello/hello.gno
=== RUN   TestVmHandlerQuery_File/gno.land/r/hello/README.md
=== RUN   TestVmHandlerQuery_File/gno.land/r/hello/doesnotexist.gno
=== RUN   TestVmHandlerQuery_File/gno.land/r/hello
=== RUN   TestVmHandlerQuery_File/gno.land/r/doesnotexist
=== RUN   TestVmHandlerQuery_File/gno.land/r/doesnotexist/hello.gno
--- PASS: TestVmHandlerQuery_File (0.00s)
    --- PASS: TestVmHandlerQuery_File/gno.land/r/hello/hello.gno (0.00s)
    --- PASS: TestVmHandlerQuery_File/gno.land/r/hello/README.md (0.00s)
    --- PASS: TestVmHandlerQuery_File/gno.land/r/hello/doesnotexist.gno (0.00s)
    --- PASS: TestVmHandlerQuery_File/gno.land/r/hello (0.00s)
    --- PASS: TestVmHandlerQuery_File/gno.land/r/doesnotexist (0.00s)
    --- PASS: TestVmHandlerQuery_File/gno.land/r/doesnotexist/hello.gno (0.00s)
PASS
ok  	github.com/gnolang/gno/gno.land/pkg/sdk/vm	(cached)

@moul moul self-assigned this Jun 28, 2024
@github-actions github-actions bot added the 📦 ⛰️ gno.land Issues or PRs gno.land package related label Jun 28, 2024
@moul moul changed the title dev/moul/vmhandler test chore: add unit tests for vmHandler Jun 28, 2024
Signed-off-by: moul <[email protected]>
@moul moul marked this pull request as ready for review June 28, 2024 18:04
moul added 2 commits June 28, 2024 20:46
Signed-off-by: moul <[email protected]>
Signed-off-by: moul <[email protected]>
@moul moul changed the title chore: add unit tests for vmHandler chore(gno.land): add unit tests for sdk/vm.vmHandler Jun 28, 2024
Copy link

codecov bot commented Jul 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.39%. Comparing base (494976d) to head (d61515b).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2459      +/-   ##
==========================================
+ Coverage   63.11%   63.39%   +0.27%     
==========================================
  Files         548      548              
  Lines       78509    79895    +1386     
==========================================
+ Hits        49554    50650    +1096     
- Misses      25609    25853     +244     
- Partials     3346     3392      +46     
Flag Coverage Δ
contribs/gnodev 59.94% <ø> (-0.63%) ⬇️
contribs/gnofaucet 14.82% <ø> (-0.95%) ⬇️
gno.land 67.18% <ø> (+3.35%) ⬆️
gnovm 67.88% <ø> (ø)
misc/genstd 79.72% <ø> (ø)
tm2 62.29% <ø> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@thehowl
Copy link
Member

thehowl commented Sep 23, 2024

ci is failing. didn't you fix this yesterday?

gno.land/pkg/sdk/vm/handler_test.go Outdated Show resolved Hide resolved
gno.land/pkg/sdk/vm/handler_test.go Outdated Show resolved Hide resolved
Signed-off-by: moul <[email protected]>
@moul
Copy link
Member Author

moul commented Oct 3, 2024

should be fixed.

@moul
Copy link
Member Author

moul commented Oct 27, 2024

Ready for new review.

@thehowl thehowl changed the title chore(gno.land): add unit tests for sdk/vm.vmHandler test(gno.land): add unit tests for sdk/vm.vmHandler Oct 30, 2024
@thehowl thehowl merged commit e9640ef into gnolang:master Oct 30, 2024
126 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 ⛰️ gno.land Issues or PRs gno.land package related
Projects
Status: Done
Status: ✅ Done
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants