tv3.nim 724 B

1234567891011121314151617181920212223242526272829303132
  1. # tests v3
  2. type
  3. Foo* = ref object of RootObj
  4. bar*: string
  5. proc test(f: Foo) =
  6. echo f.ba#[!]#r
  7. #[!]#
  8. discard """
  9. $nimsuggest --v3 --tester $file
  10. >use $1
  11. def skField tv3.Foo.bar string $file 5 4 "" 100
  12. use skField tv3.Foo.bar string $file 8 9 "" 100
  13. >def $1
  14. def skField tv3.Foo.bar string $file 5 4 "" 100
  15. >outline $1
  16. outline skType tv3.Foo Foo $file 4 2 "" 100
  17. outline skField tv3.Foo.bar string $file 5 4 "" 100
  18. outline skProc tv3.test proc (f: Foo){.gcsafe, locks: 0.} $file 7 5 "" 100
  19. >sug $1
  20. sug skField bar string $file 5 4 "" 100 Prefix
  21. >globalSymbols test
  22. def skProc tv3.test proc (f: Foo){.gcsafe, locks: 0.} $file 7 5 "" 100
  23. >globalSymbols Foo
  24. def skType tv3.Foo Foo $file 4 2 "" 100
  25. >def $2
  26. >use $2
  27. """