Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(gno.land): add unit tests for sdk/vm.vmHandler (#2459)
```console 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) ``` --------- Signed-off-by: moul <[email protected]>
- Loading branch information