git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12108 626c5289-ae23-0410-ae9c-e8d60b6d4f22
19 lines
212 B
Go
19 lines
212 B
Go
package main
|
|
|
|
import . "./smart_pointer_simple"
|
|
|
|
func main() {
|
|
f := NewFoo()
|
|
b := NewBar(f)
|
|
|
|
b.SetX(3)
|
|
if b.Getx() != 3 {
|
|
panic(0)
|
|
}
|
|
|
|
fp := b.X__deref__()
|
|
fp.SetX(4)
|
|
if fp.Getx() != 4 {
|
|
panic(0)
|
|
}
|
|
}
|