PageRenderTime 13ms CodeModel.GetById 10ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Go | 27 lines | 20 code | 7 blank | 0 comment | 8 complexity | 3ad041534eaf4aa1f7759ef9d82f6850 MD5 | raw file
 1package main
 2
 3import "./cpp_enum"
 4
 5func main() {
 6	f := cpp_enum.NewFoo()
 7
 8	if f.GetHola() != cpp_enum.FooHello {
 9		panic(f.GetHola())
10	}
11
12	f.SetHola(cpp_enum.FooHi)
13	if f.GetHola() != cpp_enum.FooHi {
14		panic(f.GetHola())
15	}
16
17	f.SetHola(cpp_enum.FooHello)
18
19	if f.GetHola() != cpp_enum.FooHello {
20		panic(f.GetHola())
21	}
22
23	cpp_enum.SetHi(cpp_enum.Hello)
24	if cpp_enum.GetHi() != cpp_enum.Hello {
25		panic(cpp_enum.Hi)
26	}
27}