Add support for the Go programming language.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12108 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
09f14197ac
commit
5af2978f77
259 changed files with 16159 additions and 14 deletions
22
Examples/test-suite/go/overload_extend_runme.go
Normal file
22
Examples/test-suite/go/overload_extend_runme.go
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
package main
|
||||
|
||||
import "./overload_extend"
|
||||
|
||||
func main() {
|
||||
f := overload_extend.NewFoo()
|
||||
if f.Test().(int) != 0 {
|
||||
panic(0)
|
||||
}
|
||||
if f.Test(3).(int) != 1 {
|
||||
panic(0)
|
||||
}
|
||||
if f.Test("hello").(int) != 2 {
|
||||
panic(0)
|
||||
}
|
||||
if f.Test(float64(3), float64(2)).(float64) != 5 {
|
||||
panic(0)
|
||||
}
|
||||
if f.Test(float64(3.0)).(float64) != 1003 {
|
||||
panic(0)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue