swig/Examples/test-suite/go/smart_pointer_member_runme.go
Ian Lance Taylor 2970f53c21 Remove the -rename option in the Go language support. Do a much
better job of checking for name conflicts.  Ignore conflicting names
with a warning.  Adjust the testsuite accordingly.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12135 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-06-17 18:59:26 +00:00

30 lines
335 B
Go

package main
import "fmt"
import . "./smart_pointer_member"
func main() {
f := NewFoo()
f.SetY(1)
if f.GetY() != 1 {
panic(0)
}
b := NewBar(f)
b.SetY(2)
if f.GetY() != 2 {
fmt.Println(f.GetY())
fmt.Println(b.GetY())
panic(0)
}
if b.GetX() != f.GetX() {
panic(0)
}
if b.GetZ() != GetFooZ() {
panic(0)
}
}