summary refs log tree commit diff stats
path: root/tests/caas/idetools_api.nim
diff options
context:
space:
mode:
authorGrzegorz Adam Hankiewicz <gradha@imap.cc>2013-06-07 21:24:45 +0200
committerGrzegorz Adam Hankiewicz <gradha@imap.cc>2013-06-07 21:24:45 +0200
commitf11a3b2324290cfebc328284c6f74287e7652e44 (patch)
tree253a3cbf42482edb3cceee463c08240f03aa8735 /tests/caas/idetools_api.nim
parent1d813167c4464e3d955764ca54a1df51817ace4d (diff)
downloadNim-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.nim23
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