make tests green again
This commit is contained in:
parent
3f6168b337
commit
6279b0587a
6 changed files with 16 additions and 16 deletions
|
|
@ -5,8 +5,8 @@ import os
|
||||||
|
|
||||||
type
|
type
|
||||||
Window = object
|
Window = object
|
||||||
oneInstSock*: PAsyncSocket
|
oneInstSock*: AsyncSocket
|
||||||
IODispatcher*: PDispatcher
|
IODispatcher*: Dispatcher
|
||||||
|
|
||||||
var
|
var
|
||||||
win: Window
|
win: Window
|
||||||
|
|
@ -14,9 +14,9 @@ var
|
||||||
proc initSocket() =
|
proc initSocket() =
|
||||||
win.oneInstSock = asyncSocket()
|
win.oneInstSock = asyncSocket()
|
||||||
#win.oneInstSock.handleAccept =
|
#win.oneInstSock.handleAccept =
|
||||||
proc test(s: PAsyncSocket) =
|
proc test(s: AsyncSocket) =
|
||||||
var client: PAsyncSocket
|
var client: AsyncSocket
|
||||||
proc dummy(c: PAsyncSocket) {.closure.} =
|
proc dummy(c: AsyncSocket) {.closure.} =
|
||||||
discard
|
discard
|
||||||
client.handleRead = dummy
|
client.handleRead = dummy
|
||||||
test(win.oneInstSock)
|
test(win.oneInstSock)
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,12 @@ import sequtils
|
||||||
import times
|
import times
|
||||||
|
|
||||||
# 1
|
# 1
|
||||||
proc f(n: int): TimeInfo =
|
proc f(n: int): DateTime =
|
||||||
TimeInfo(year: n, month: mJan, monthday: 1)
|
DateTime(year: n, month: mJan, monthday: 1)
|
||||||
|
|
||||||
echo toSeq(2000 || 2015).map(f)
|
echo toSeq(2000 || 2015).map(f)
|
||||||
|
|
||||||
# 2
|
# 2
|
||||||
echo toSeq(2000 || 2015).map(proc (n: int): TimeInfo =
|
echo toSeq(2000 || 2015).map(proc (n: int): DateTime =
|
||||||
TimeInfo(year: n, month: mJan, monthday: 1)
|
DateTime(year: n, month: mJan, monthday: 1)
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
|
|
||||||
import tables
|
import tables
|
||||||
|
|
||||||
proc test(): TTable[string, string] =
|
proc test(): Table[string, string] =
|
||||||
discard
|
discard
|
||||||
|
|
||||||
proc test2(): TTable[string, string] =
|
proc test2(): Table[string, string] =
|
||||||
discard
|
discard
|
||||||
|
|
||||||
var x = 5
|
var x = 5
|
||||||
|
|
|
||||||
|
|
@ -102,9 +102,9 @@ block tsets2:
|
||||||
|
|
||||||
block tsets3:
|
block tsets3:
|
||||||
let
|
let
|
||||||
s1: TSet[int] = toSet([1, 2, 4, 8, 16])
|
s1: HashSet[int] = toSet([1, 2, 4, 8, 16])
|
||||||
s2: TSet[int] = toSet([1, 2, 3, 5, 8])
|
s2: HashSet[int] = toSet([1, 2, 3, 5, 8])
|
||||||
s3: TSet[int] = toSet([3, 5, 7])
|
s3: HashSet[int] = toSet([3, 5, 7])
|
||||||
|
|
||||||
block union:
|
block union:
|
||||||
let
|
let
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ when not defined(windows):
|
||||||
import posix
|
import posix
|
||||||
|
|
||||||
var
|
var
|
||||||
u: Tutsname
|
u: Utsname
|
||||||
|
|
||||||
discard uname(u)
|
discard uname(u)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ proc thread_proc(input: some_type): some_type {.thread.} =
|
||||||
result.bla = 1
|
result.bla = 1
|
||||||
|
|
||||||
proc main() =
|
proc main() =
|
||||||
var actorPool: TActorPool[some_type, some_type]
|
var actorPool: ActorPool[some_type, some_type]
|
||||||
createActorPool(actorPool, 1)
|
createActorPool(actorPool, 1)
|
||||||
|
|
||||||
var some_data: some_type
|
var some_data: some_type
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue