summaryrefslogtreecommitdiff
path: root/Examples/test-suite/go/extend_placement_runme.go
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@google.com>2010-06-10 01:13:31 +0000
committerIan Lance Taylor <iant@google.com>2010-06-10 01:13:31 +0000
commit5af2978f77cad0eec048ba1ea09b07e8ad7abbfa (patch)
tree2a7c8d569dde6570e0a5baa907bb5b3084697a52 /Examples/test-suite/go/extend_placement_runme.go
parent09f14197ac1df83e9b428d84782238abec0500bd (diff)
downloadswig-5af2978f77cad0eec048ba1ea09b07e8ad7abbfa.tar.gz
Add support for the Go programming language.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12108 626c5289-ae23-0410-ae9c-e8d60b6d4f22
Diffstat (limited to 'Examples/test-suite/go/extend_placement_runme.go')
-rw-r--r--Examples/test-suite/go/extend_placement_runme.go47
1 files changed, 47 insertions, 0 deletions
diff --git a/Examples/test-suite/go/extend_placement_runme.go b/Examples/test-suite/go/extend_placement_runme.go
new file mode 100644
index 000000000..f74831c7d
--- /dev/null
+++ b/Examples/test-suite/go/extend_placement_runme.go
@@ -0,0 +1,47 @@
+package main
+
+import "./extend_placement"
+
+func main() {
+ foo := extend_placement.NewFoo()
+ foo = extend_placement.NewFoo(1)
+ foo = extend_placement.NewFoo(1, 1)
+ foo.Spam()
+ foo.Spam("hello")
+ foo.Spam(1)
+ foo.Spam(1, 1)
+ foo.Spam(1, 1, 1)
+ foo.Spam(extend_placement.NewFoo())
+ foo.Spam(extend_placement.NewFoo(), float64(1.0))
+
+ bar := extend_placement.NewBar()
+ bar = extend_placement.NewBar(1)
+ bar.Spam()
+ bar.Spam("hello")
+ bar.Spam(1)
+ bar.Spam(1, 1)
+ bar.Spam(1, 1, 1)
+ bar.Spam(extend_placement.NewBar())
+ bar.Spam(extend_placement.NewBar(), float64(1.0))
+
+ footi := extend_placement.NewFooTi()
+ footi = extend_placement.NewFooTi(1)
+ footi = extend_placement.NewFooTi(1, 1)
+ footi.Spam()
+ footi.Spam("hello")
+ footi.Spam(1)
+ footi.Spam(1, 1)
+ footi.Spam(1, 1, 1)
+ footi.Spam(extend_placement.NewFoo())
+ footi.Spam(extend_placement.NewFoo(), float64(1.0))
+
+ barti := extend_placement.NewBarTi()
+ barti = extend_placement.NewBarTi(1)
+ barti.Spam()
+ barti.Spam("hello")
+ barti.Spam(1)
+ barti.Spam(1, 1)
+ barti.Spam(1, 1, 1)
+ barti.Spam(extend_placement.NewBar())
+ barti.Spam(extend_placement.NewBar(), float64(1.0))
+}