Stop using relative imports and add a go.mod file. Tested against Go 1.6 through Go pre-1.13, and gccgo.
29 lines
441 B
Go
29 lines
441 B
Go
package main
|
|
|
|
import "swigtests/multi_import_a"
|
|
import "swigtests/multi_import_b"
|
|
|
|
func main() {
|
|
x := multi_import_b.NewXXX()
|
|
if x.Testx() != 0 {
|
|
panic(0)
|
|
}
|
|
|
|
y := multi_import_b.NewYYY()
|
|
if y.Testx() != 0 {
|
|
panic(0)
|
|
}
|
|
if y.Testy() != 1 {
|
|
panic(0)
|
|
}
|
|
|
|
z := multi_import_a.NewZZZ()
|
|
if z.Testx() != 0 {
|
|
println("z.Testx", z.Testx(), z.Testz())
|
|
panic(0)
|
|
}
|
|
if z.Testz() != 2 {
|
|
println("z.Testz", z.Testz())
|
|
panic(0)
|
|
}
|
|
}
|