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

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

#
Go | 26 lines | 20 code | 6 blank | 0 comment | 8 complexity | 2c8eabcf7cbea783bbe94f564320b8c1 MD5 | raw file
 1package main
 2
 3import . "./template_ns"
 4
 5func main() {
 6	p1 := NewPairii(2, 3)
 7	p2 := NewPairii(p1)
 8
 9	if p2.GetFirst() != 2 {
10		panic(0)
11	}
12	if p2.GetSecond() != 3 {
13		panic(0)
14	}
15
16	p3 := NewPairdd(3.5, 2.5)
17	p4 := NewPairdd(p3)
18
19	if p4.GetFirst() != 3.5 {
20		panic(0)
21	}
22
23	if p4.GetSecond() != 2.5 {
24		panic(0)
25	}
26}