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
57
Examples/test-suite/go/primitive_ref_runme.go
Normal file
57
Examples/test-suite/go/primitive_ref_runme.go
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
package main
|
||||
|
||||
import . "./primitive_ref"
|
||||
|
||||
func main() {
|
||||
if Ref_int(3) != 3 {
|
||||
panic(0)
|
||||
}
|
||||
|
||||
if Ref_uint(3) != 3 {
|
||||
panic(0)
|
||||
}
|
||||
|
||||
if Ref_short(3) != 3 {
|
||||
panic(0)
|
||||
}
|
||||
|
||||
if Ref_ushort(3) != 3 {
|
||||
panic(0)
|
||||
}
|
||||
|
||||
if Ref_long(3) != 3 {
|
||||
panic(0)
|
||||
}
|
||||
|
||||
if Ref_ulong(3) != 3 {
|
||||
panic(0)
|
||||
}
|
||||
|
||||
if Ref_schar(3) != 3 {
|
||||
panic(0)
|
||||
}
|
||||
|
||||
if Ref_uchar(3) != 3 {
|
||||
panic(0)
|
||||
}
|
||||
|
||||
if Ref_float(3.5) != 3.5 {
|
||||
panic(0)
|
||||
}
|
||||
|
||||
if Ref_double(3.5) != 3.5 {
|
||||
panic(0)
|
||||
}
|
||||
|
||||
if Ref_bool(true) != true {
|
||||
panic(0)
|
||||
}
|
||||
|
||||
if Ref_char('x') != 'x' {
|
||||
panic(0)
|
||||
}
|
||||
|
||||
if Ref_over(0) != 0 {
|
||||
panic(0)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue