/trunk/Examples/test-suite/go/typedef_inherit_runme.go
Go | 31 lines | 24 code | 7 blank | 0 comment | 8 complexity | 6af41982cfd943ce2ff24d411716d9c5 MD5 | raw file
1package main 2 3import "./typedef_inherit" 4 5func main() { 6 a := typedef_inherit.NewFoo() 7 b := typedef_inherit.NewBar() 8 9 x := typedef_inherit.Do_blah(a) 10 if x != "Foo::blah" { 11 panic(x) 12 } 13 14 x = typedef_inherit.Do_blah(b) 15 if x != "Bar::blah" { 16 panic(x) 17 } 18 19 c := typedef_inherit.NewSpam() 20 d := typedef_inherit.NewGrok() 21 22 x = typedef_inherit.Do_blah2(c) 23 if x != "Spam::blah" { 24 panic(x) 25 } 26 27 x = typedef_inherit.Do_blah2(d) 28 if x != "Grok::blah" { 29 panic(x) 30 } 31}