From a5ecbf823f178c2800d40bcff562bc4eca0f2030 Mon Sep 17 00:00:00 2001 From: Arne Döring Date: Wed, 5 Dec 2018 19:03:01 +0100 Subject: lots of small changes --- tests/niminaction/Chapter3/ChatApp/src/protocol.nim | 2 +- tests/niminaction/Chapter3/ChatApp/src/server.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/niminaction/Chapter3/ChatApp') diff --git a/tests/niminaction/Chapter3/ChatApp/src/protocol.nim b/tests/niminaction/Chapter3/ChatApp/src/protocol.nim index af515861c..4c122d4cc 100644 --- a/tests/niminaction/Chapter3/ChatApp/src/protocol.nim +++ b/tests/niminaction/Chapter3/ChatApp/src/protocol.nim @@ -37,7 +37,7 @@ proc createMessage*(username, message: string): string = "message": %message }) & "\c\l" -when isMainModule: +when true: block: let data = """{"username": "dom", "message": "hello"}""" let parsed = parseMessage(data) diff --git a/tests/niminaction/Chapter3/ChatApp/src/server.nim b/tests/niminaction/Chapter3/ChatApp/src/server.nim index 31da74d16..fbf0e5110 100644 --- a/tests/niminaction/Chapter3/ChatApp/src/server.nim +++ b/tests/niminaction/Chapter3/ChatApp/src/server.nim @@ -79,7 +79,7 @@ proc loop(server: Server, port = 7687) {.async.} = # Check whether this module has been imported as a dependency to another # module, or whether this module is the main module. -when isMainModule: +when true: # Initialise a new server. var server = newServer() echo("Server initialised!") -- cgit 1.4.1-2-gfad0