PageRenderTime 9ms CodeModel.GetById 2ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Go | 30 lines | 22 code | 8 blank | 0 comment | 2 complexity | ae79b48d2d784c01ac997eceb34bdad2 MD5 | raw file
 1package main
 2
 3import "./li_std_map"
 4
 5func main() {
 6	a1 := li_std_map.NewA(3)
 7	a2 := li_std_map.NewA(7)
 8
 9	_ = li_std_map.NewPairii(1, 2)
10	p1 := li_std_map.NewPairA(1, a1)
11	m := li_std_map.NewMapA()
12	m.Set(1, a1)
13	m.Set(2, a2)
14
15	_ = li_std_map.P_identa(p1)
16	_ = li_std_map.M_identa(m)
17
18	m = li_std_map.NewMapA()
19	m.Set(1, a1)
20	m.Set(2, a2)
21
22	mii := li_std_map.NewIntIntMap()
23
24	mii.Set(1, 1)
25	mii.Set(1, 2)
26
27	if mii.Get(1) != 2 {
28		panic(0)
29	}
30}