swig/Examples/test-suite/go/smart_pointer_templatevariables_runme.go
Ian Lance Taylor 7aafe3d8b2 Fix all Go tests to build with "go build"
Tested against Go 1.6 through Go 1.13beta1, and gccgo.

Fixes #1607
2019-08-08 14:30:50 -07:00

22 lines
318 B
Go

package main
import . "swigtests/smart_pointer_templatevariables"
func main() {
d := NewDiffImContainerPtr_D(Create(1234, 5678))
if d.GetId() != 1234 {
panic(0)
}
//if (d.xyz != 5678):
// panic(0)
d.SetId(4321)
//d.xyz = 8765
if d.GetId() != 4321 {
panic(0)
}
//if (d.xyz != 8765):
// panic(0)
}