make tests green again

This commit is contained in:
Araq 2018-11-16 19:54:49 +01:00
commit 6279b0587a
6 changed files with 16 additions and 16 deletions

View file

@ -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)

View file

@ -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)
)