gnolang / gno

Gno: An interpreted, stack-based Go virtual machine to build succinct and composable apps + Gno.land: a blockchain for timeless code and fair open-source.
https://gno.land/
Other
880 stars 364 forks source link

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

Open moul opened 3 months ago

moul commented 3 months ago
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)
codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 60.72%. Comparing base (9897b66) to head (bb9366d).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2459 +/- ## ========================================== - Coverage 60.87% 60.72% -0.15% ========================================== Files 563 559 -4 Lines 75193 75827 +634 ========================================== + Hits 45770 46048 +278 - Misses 26055 26369 +314 - Partials 3368 3410 +42 ``` | [Flag](https://app.codecov.io/gh/gnolang/gno/pull/2459/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | Coverage Δ | | |---|---|---| | [contribs/gnodev](https://app.codecov.io/gh/gnolang/gno/pull/2459/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `61.46% <ø> (ø)` | | | [contribs/gnofaucet](https://app.codecov.io/gh/gnolang/gno/pull/2459/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `14.46% <ø> (-0.86%)` | :arrow_down: | | [gnovm](https://app.codecov.io/gh/gnolang/gno/pull/2459/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `65.63% <ø> (ø)` | | | [misc/genstd](https://app.codecov.io/gh/gnolang/gno/pull/2459/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `80.54% <ø> (ø)` | | | [misc/logos](https://app.codecov.io/gh/gnolang/gno/pull/2459/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `19.88% <ø> (-0.36%)` | :arrow_down: | | [tm2](https://app.codecov.io/gh/gnolang/gno/pull/2459/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang) | `61.99% <ø> (-0.10%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=gnolang#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

thehowl commented 6 days ago

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