compiler: make main function normally to compatible multiple main functions in testing mode
This commit is contained in:
@@ -152,10 +152,6 @@ func TestCompileEx(t *testing.T, src any, fname, expected string, dbg bool) {
|
||||
t.Fatal("cl.NewPackage failed:", err)
|
||||
}
|
||||
|
||||
if prog.NeedPyInit { // call PyInit if needed
|
||||
ret.PyInit()
|
||||
}
|
||||
|
||||
if v := ret.String(); v != expected && expected != ";" { // expected == ";" means skipping out.ll
|
||||
t.Fatalf("\n==> got:\n%s\n==> expected:\n%s\n", v, expected)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user