PageRenderTime 10ms CodeModel.GetById 1ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 1ms

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

#
Go | 19 lines | 15 code | 4 blank | 0 comment | 4 complexity | 699f93409aec1b97cd6fa1b589415a5f MD5 | raw file
 1package main
 2
 3import . "./smart_pointer_simple"
 4
 5func main() {
 6	f := NewFoo()
 7	b := NewBar(f)
 8
 9	b.SetX(3)
10	if b.Getx() != 3 {
11		panic(0)
12	}
13
14	fp := b.X__deref__()
15	fp.SetX(4)
16	if fp.Getx() != 4 {
17		panic(0)
18	}
19}