summaryrefslogtreecommitdiff
path: root/Examples/test-suite/go/argcargvtest_runme.go
blob: 3da3d76ddd22b4f2e3f4c0e7a4645449f2195239 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package main

import wrap "swigtests/argcargvtest"

func main() {
	largs := []string{"hi", "hola", "hello"}
	if ri := wrap.Mainc(largs); ri != 3 {
		panic(ri)
	}

	targs := []string{"hi", "hola"}
	if rs := wrap.Mainv(targs, 1); rs != "hola" {
		panic(rs)
	}

// For dynamically typed languages we test this throws an exception or similar
// at runtime, but for Go this doesn't even compile (but we can't easily
// test for that here).
//	wrap.Mainv("hello", 1)

	wrap.InitializeApp(largs)
}