diff options
author | Grzegorz Adam Hankiewicz <gradha@imap.cc> | 2013-06-07 21:24:45 +0200 |
---|---|---|
committer | Grzegorz Adam Hankiewicz <gradha@imap.cc> | 2013-06-07 21:24:45 +0200 |
commit | f11a3b2324290cfebc328284c6f74287e7652e44 (patch) | |
tree | 253a3cbf42482edb3cceee463c08240f03aa8735 /tests/caas/idetools_api.nim | |
parent | 1d813167c4464e3d955764ca54a1df51817ace4d (diff) | |
download | Nim-f11a3b2324290cfebc328284c6f74287e7652e44.tar.gz |
Adds generic idetools api test case.
At the moment three lines of the test case fail in proc mode.
Diffstat (limited to 'tests/caas/idetools_api.nim')
-rw-r--r-- | tests/caas/idetools_api.nim | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/caas/idetools_api.nim b/tests/caas/idetools_api.nim new file mode 100644 index 000000000..930d26429 --- /dev/null +++ b/tests/caas/idetools_api.nim @@ -0,0 +1,23 @@ +import unicode, sequtils + +proc test_enums() = + var o: Tfile + if o.open("files " & "test.txt", fmWrite): + o.write("test") + o.close() + +proc test_iterators(filename = "tests.nim") = + let + input = readFile(filename) + letters = toSeq(runes(string(input))) + for letter in letters: echo int(letter) + +const SOME_SEQUENCE = @[1, 2] +type + bad_string = distinct string + TPerson = object of TObject + name*: bad_string + age: int + +proc adder(a, b: int): int = + result = a + b |