From 9a4a25e3e03a32eaefa57e70d2e08bc24154f894 Mon Sep 17 00:00:00 2001 From: Dustin Brody Date: Thu, 17 Mar 2022 21:13:32 +0000 Subject: [PATCH] fix 32-bit timer overflow and typo in base64 error message --- tests/base64.nim | 2 +- tests/test_pipelines.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/base64.nim b/tests/base64.nim index 3bd9c88..74b310a 100644 --- a/tests/base64.nim +++ b/tests/base64.nim @@ -121,7 +121,7 @@ proc base64decode*(i: InputStream, o: OutputStream) {.fsMultiSync.} = inputChar(d) outputChar(c shl 6 or d shr 0) elif i.readable: - raise newException(ValueError, "The input stream has insufficient nymber of bytes for base64 decoding") + raise newException(ValueError, "The input stream has insufficient number of bytes for base64 decoding") close o diff --git a/tests/test_pipelines.nim b/tests/test_pipelines.nim index 6952a9e..5640616 100644 --- a/tests/test_pipelines.nim +++ b/tests/test_pipelines.nim @@ -41,7 +41,7 @@ when fsAsyncSupport: template timeit(timerVar: var Nanos, code: untyped) = let t0 = getTicks() code - timerVar = int(getTicks() - t0) div 1000000 + timerVar = int64(getTicks() - t0) div 1000000 proc getOutput(sp: AsyncInputStream, T: type string): Future[string] {.async.} = # this proc is a quick hack to let the test pass