summary refs log tree commit diff stats
path: root/tests/accept/compile
diff options
context:
space:
mode:
authorAndreas Rumpf <andreas@andreas-laptop>2010-05-28 23:33:29 +0200
committerAndreas Rumpf <andreas@andreas-laptop>2010-05-28 23:33:29 +0200
commitb34b1dbc6c7290a893149aa9f5ea5d54a37c8522 (patch)
treed61f14d6f56eab37178242b61c83fdbbd87db30d /tests/accept/compile
parent6c2050912166a4960b40c3825afb1a31cfdde0eb (diff)
downloadNim-b34b1dbc6c7290a893149aa9f5ea5d54a37c8522.tar.gz
added tests
Diffstat (limited to 'tests/accept/compile')
-rw-r--r--tests/accept/compile/tdictdestruct.nim16
-rw-r--r--tests/accept/compile/tgetstartmilsecs.nim7
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/accept/compile/tdictdestruct.nim b/tests/accept/compile/tdictdestruct.nim
new file mode 100644
index 000000000..20ca4ba94
--- /dev/null
+++ b/tests/accept/compile/tdictdestruct.nim
@@ -0,0 +1,16 @@
+
+type
+  TDict[TK, TV] = object
+    k: TK
+    v: TV
+  PDict[TK, TV] = ref TDict[TK, TV]
+
+proc destroyDict[TK, TV](a : PDict[TK, TV]) =
+    return
+proc newDict[TK, TV](a: TK, b: TV): PDict[TK, TV] =
+    new(result, destroyDict)
+    
+
+discard newDict("a", "b")    
+
+
diff --git a/tests/accept/compile/tgetstartmilsecs.nim b/tests/accept/compile/tgetstartmilsecs.nim
new file mode 100644
index 000000000..340c78af1
--- /dev/null
+++ b/tests/accept/compile/tgetstartmilsecs.nim
@@ -0,0 +1,7 @@
+# 
+import times, os
+
+var start = getStartMilsecs()
+os.sleep(1000)
+
+echo getStartMilsecs() - start #OUT 1000