PageRenderTime 26ms CodeModel.GetById 1ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Go | 26 lines | 20 code | 6 blank | 0 comment | 8 complexity | 2c8eabcf7cbea783bbe94f564320b8c1 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. package main
  2. import . "./template_ns"
  3. func main() {
  4. p1 := NewPairii(2, 3)
  5. p2 := NewPairii(p1)
  6. if p2.GetFirst() != 2 {
  7. panic(0)
  8. }
  9. if p2.GetSecond() != 3 {
  10. panic(0)
  11. }
  12. p3 := NewPairdd(3.5, 2.5)
  13. p4 := NewPairdd(p3)
  14. if p4.GetFirst() != 3.5 {
  15. panic(0)
  16. }
  17. if p4.GetSecond() != 2.5 {
  18. panic(0)
  19. }
  20. }