Skip to content
This repository has been archived by the owner on Jul 7, 2019. It is now read-only.

Commit

Permalink
assert() -> doAssert()
Browse files Browse the repository at this point in the history
  • Loading branch information
stefantalpalaru committed Mar 13, 2019
1 parent 9820877 commit 1beb0f6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions byteutils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ func hexToByteArray*(hexStr: string, output: var openArray[byte], fromIdx, toIdx
## Allows specifying the byte range to process into the array
var sIdx = skip0xPrefix(hexStr)

assert(fromIdx >= 0 and toIdx >= fromIdx and fromIdx < output.len and toIdx < output.len)
doAssert(fromIdx >= 0 and toIdx >= fromIdx and fromIdx < output.len and toIdx < output.len)
let sz = toIdx - fromIdx + 1

assert hexStr.len - sIdx >= 2*sz
doAssert hexStr.len - sIdx >= 2*sz

sIdx += fromIdx * 2
for bIdx in fromIdx ..< sz + fromIdx:
Expand Down
4 changes: 2 additions & 2 deletions byteutils.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ proc test(name: string, defaultLang = "c") =
if not dirExists "nimcache":
mkDir "nimcache"
--run
--nimcache:"nimcache"
--threads:"on"
--nimcache:nimcache
--threads:on
switch("out", ("./build/" & name))
setCommand defaultLang, "tests/" & name & ".nim"

Expand Down

0 comments on commit 1beb0f6

Please sign in to comment.