MCPcopy Create free account
hub / github.com/goplus/py / TestGoModule

Function TestGoModule

gomodule_test.go:38–60  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

36}
37
38func TestGoModule(t *testing.T) {
39
40 gomod, err := NewGoModule("foo", "", new(FooModule))
41 if err != nil {
42 t.Fatal("NewGoModule failed:", err)
43 }
44 defer gomod.Decref()
45
46 for _, c := range g_gomoduleCases {
47
48 code, err := Compile(c.exp, "", FileInput)
49 if err != nil {
50 t.Fatal("Compile failed:", err)
51 }
52 defer code.Decref()
53
54 mod, err := ExecCodeModule(c.name, code.Obj())
55 if err != nil {
56 t.Fatal("ExecCodeModule failed:", err)
57 }
58 defer mod.Decref()
59 }
60}
61
62// ------------------------------------------------------------------------------------------
63

Callers

nothing calls this directly

Calls 5

NewGoModuleFunction · 0.85
CompileFunction · 0.85
ExecCodeModuleFunction · 0.85
DecrefMethod · 0.80
ObjMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…