PageRenderTime 46ms CodeModel.GetById 12ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Go | 31 lines | 24 code | 7 blank | 0 comment | 8 complexity | 6af41982cfd943ce2ff24d411716d9c5 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. package main
  2. import "./typedef_inherit"
  3. func main() {
  4. a := typedef_inherit.NewFoo()
  5. b := typedef_inherit.NewBar()
  6. x := typedef_inherit.Do_blah(a)
  7. if x != "Foo::blah" {
  8. panic(x)
  9. }
  10. x = typedef_inherit.Do_blah(b)
  11. if x != "Bar::blah" {
  12. panic(x)
  13. }
  14. c := typedef_inherit.NewSpam()
  15. d := typedef_inherit.NewGrok()
  16. x = typedef_inherit.Do_blah2(c)
  17. if x != "Spam::blah" {
  18. panic(x)
  19. }
  20. x = typedef_inherit.Do_blah2(d)
  21. if x != "Grok::blah" {
  22. panic(x)
  23. }
  24. }