PageRenderTime 101ms CodeModel.GetById 34ms RepoModel.GetById 1ms app.codeStats 0ms

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

#
Go | 29 lines | 25 code | 4 blank | 0 comment | 10 complexity | 070a2d4c5689f71056575a89c7e86470 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. package main
  2. import "multi_import_a"
  3. import "multi_import_b"
  4. func main() {
  5. x := multi_import_b.NewXXX()
  6. if x.Testx() != 0 {
  7. panic(0)
  8. }
  9. y := multi_import_b.NewYYY()
  10. if y.Testx() != 0 {
  11. panic(0)
  12. }
  13. if y.Testy() != 1 {
  14. panic(0)
  15. }
  16. z := multi_import_a.NewZZZ()
  17. if z.Testx() != 0 {
  18. println("z.Testx", z.Testx(), z.Testz())
  19. panic(0)
  20. }
  21. if z.Testz() != 2 {
  22. println("z.Testz", z.Testz())
  23. panic(0)
  24. }
  25. }