summary refs log tree commit diff stats
path: root/tests/closure
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2018-11-16 19:54:49 +0100
committerAraq <rumpf_a@web.de>2018-11-16 19:54:49 +0100
commit6279b0587a9551d8c205e682d28a731f2986c456 (patch)
tree436169010f96ee20521b1bf64fc2cf4215674976 /tests/closure
parent3f6168b3372013c0d4b938e6a83849199d9756c9 (diff)
downloadNim-6279b0587a9551d8c205e682d28a731f2986c456.tar.gz
make tests green again
Diffstat (limited to 'tests/closure')
-rw-r--r--tests/closure/texplicit_dummy_closure.nim10
-rw-r--r--tests/closure/ttimeinfo.nim8
2 files changed, 9 insertions, 9 deletions
diff --git a/tests/closure/texplicit_dummy_closure.nim b/tests/closure/texplicit_dummy_closure.nim
index ec608b31a..9cd8c8ca9 100644
--- a/tests/closure/texplicit_dummy_closure.nim
+++ b/tests/closure/texplicit_dummy_closure.nim
@@ -5,8 +5,8 @@ import os
 
 type
   Window = object
-    oneInstSock*: PAsyncSocket
-    IODispatcher*: PDispatcher
+    oneInstSock*: AsyncSocket
+    IODispatcher*: Dispatcher
 
 var
   win: Window
@@ -14,9 +14,9 @@ var
 proc initSocket() =
   win.oneInstSock = asyncSocket()
   #win.oneInstSock.handleAccept =
-  proc test(s: PAsyncSocket) =
-    var client: PAsyncSocket
-    proc dummy(c: PAsyncSocket) {.closure.} =
+  proc test(s: AsyncSocket) =
+    var client: AsyncSocket
+    proc dummy(c: AsyncSocket) {.closure.} =
       discard
     client.handleRead = dummy
   test(win.oneInstSock)
diff --git a/tests/closure/ttimeinfo.nim b/tests/closure/ttimeinfo.nim
index 3138ae72e..3096a5d65 100644
--- a/tests/closure/ttimeinfo.nim
+++ b/tests/closure/ttimeinfo.nim
@@ -4,12 +4,12 @@ import sequtils
 import times
 
 # 1
-proc f(n: int): TimeInfo =
-  TimeInfo(year: n, month: mJan, monthday: 1)
+proc f(n: int): DateTime =
+  DateTime(year: n, month: mJan, monthday: 1)
 
 echo toSeq(2000 || 2015).map(f)
 
 # 2
-echo toSeq(2000 || 2015).map(proc (n: int): TimeInfo =
-  TimeInfo(year: n, month: mJan, monthday: 1)
+echo toSeq(2000 || 2015).map(proc (n: int): DateTime =
+  DateTime(year: n, month: mJan, monthday: 1)
 )