swig/Examples/test-suite/go/special_variable_macros_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

25 lines
669 B
Go

package main
import "./special_variable_macros"
func main() {
name := special_variable_macros.NewName()
if special_variable_macros.TestFred(name) != "none" {
panic("test failed")
}
if special_variable_macros.TestJack(name) != "$specialname" {
panic("test failed")
}
if special_variable_macros.TestJill(name) != "jilly" {
panic("test failed")
}
if special_variable_macros.TestMary(name) != "SWIGTYPE_p_NameWrap" {
panic("test failed")
}
if special_variable_macros.TestJim(name) != "multiname num" {
panic("test failed")
}
if special_variable_macros.TestJohn(special_variable_macros.NewPairIntBool(10, false)) != 123 {
panic("test failed")
}
}