PageRenderTime 10ms CodeModel.GetById 2ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/trunk/Examples/test-suite/go/varargs_runme.go

#
Go | 26 lines | 20 code | 6 blank | 0 comment | 10 complexity | 2f781dc6160fbb2b42bad90a083c8d76 MD5 | raw file
 1package main
 2
 3import "./varargs"
 4
 5func main() {
 6	if varargs.Test("Hello") != "Hello" {
 7		panic("Failed")
 8	}
 9
10	f := varargs.NewFoo("Greetings")
11	if f.GetStr() != "Greetings" {
12		panic("Failed")
13	}
14
15	if f.Test("Hello") != "Hello" {
16		panic("Failed")
17	}
18
19	if varargs.Test_def("Hello", 1) != "Hello" {
20		panic("Failed")
21	}
22
23	if varargs.Test_def("Hello") != "Hello" {
24		panic("Failed")
25	}
26}