PageRenderTime 57ms CodeModel.GetById 18ms RepoModel.GetById 0ms app.codeStats 0ms

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

#
Go | 26 lines | 19 code | 7 blank | 0 comment | 8 complexity | bfc9791c7d459395cfe9c2a74aacf946 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. package main
  2. import "./default_args"
  3. func main() {
  4. if default_args.StaticsStaticmethod() != 60 {
  5. panic(0)
  6. }
  7. if default_args.Cfunc1(1) != 2 {
  8. panic(0)
  9. }
  10. if default_args.Cfunc2(1) != 3 {
  11. panic(0)
  12. }
  13. if default_args.Cfunc3(1) != 4 {
  14. panic(0)
  15. }
  16. f := default_args.NewFoo()
  17. f.Newname()
  18. f.Newname(1)
  19. }