summary refs log tree commit diff stats
path: root/tests/niminaction/Chapter3
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2018-12-05 19:03:01 +0100
committerAraq <rumpf_a@web.de>2018-12-11 21:23:22 +0100
commita5ecbf823f178c2800d40bcff562bc4eca0f2030 (patch)
tree50c3812eaa7a1100c30623755263d4ef35dd1c3b /tests/niminaction/Chapter3
parentc0c35839cc65717283edda72ce34579b992563ca (diff)
downloadNim-a5ecbf823f178c2800d40bcff562bc4eca0f2030.tar.gz
lots of small changes
Diffstat (limited to 'tests/niminaction/Chapter3')
-rw-r--r--tests/niminaction/Chapter3/ChatApp/src/protocol.nim2
-rw-r--r--tests/niminaction/Chapter3/ChatApp/src/server.nim2
2 files changed, 2 insertions, 2 deletions
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!")