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

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

#
Go | 72 lines | 55 code | 17 blank | 0 comment | 30 complexity | 7fdaa64ab9f4b0e0fccb35c686d19223 MD5 | raw file
 1package main
 2
 3import . "./template_inherit"
 4
 5func main() {
 6	a := NewFooInt()
 7	b := NewFooDouble()
 8	c := NewBarInt()
 9	d := NewBarDouble()
10	e := NewFooUInt()
11	f := NewBarUInt()
12
13	if a.Blah() != "Foo" {
14		panic(0)
15	}
16
17	if b.Blah() != "Foo" {
18		panic(0)
19	}
20
21	if e.Blah() != "Foo" {
22		panic(0)
23	}
24
25	if c.Blah() != "Bar" {
26		panic(0)
27	}
28
29	if d.Blah() != "Bar" {
30		panic(0)
31	}
32
33	if f.Blah() != "Bar" {
34		panic(0)
35	}
36
37	if c.Foomethod() != "foomethod" {
38		panic(0)
39	}
40
41	if d.Foomethod() != "foomethod" {
42		panic(0)
43	}
44
45	if f.Foomethod() != "foomethod" {
46		panic(0)
47	}
48
49	if Invoke_blah_int(a) != "Foo" {
50		panic(0)
51	}
52
53	if Invoke_blah_int(c) != "Bar" {
54		panic(0)
55	}
56
57	if Invoke_blah_double(b) != "Foo" {
58		panic(0)
59	}
60
61	if Invoke_blah_double(d) != "Bar" {
62		panic(0)
63	}
64
65	if Invoke_blah_uint(e) != "Foo" {
66		panic(0)
67	}
68
69	if Invoke_blah_uint(f) != "Bar" {
70		panic(0)
71	}
72}