Skip to content

Commit

Permalink
[tests] fix testParse for parseNumber API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Vindaar committed Feb 9, 2024
1 parent 261db54 commit 8a26c32
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tests/testParse.nim
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ suite "`parseNumber` tests":
initBuf()
template checkInt(v: typed): untyped =
toBuf($v)
let ret = buf.parseNumber(sep = ',',
let ret = buf.parseNumber(sep = ',', quote = '#',
idxIn = 0,
intBuf, floatBuf)
check intBuf == v
Expand All @@ -50,7 +50,7 @@ suite "`parseNumber` tests":
initBuf()
template checkInt(str, val: typed, start: int): untyped =
toBuf(str)
let ret = buf.parseNumber(sep = ',',
let ret = buf.parseNumber(sep = ',', quote = '#',
idxIn = start,
intBuf, floatBuf)
check intBuf == val
Expand All @@ -75,7 +75,7 @@ suite "`parseNumber` tests":
for i in 0 ..< 50:
toBuf($i & "," & $i)
let start = if i < 10: 1 else: 2
let ret = buf.parseNumber(sep = ',',
let ret = buf.parseNumber(sep = ',', quote = '#',
idxIn = start,
intBuf, floatBuf)
check ret == rtNaN
Expand All @@ -84,7 +84,7 @@ suite "`parseNumber` tests":
initBuf()
template checkFloat(v: typed, class = fcNormal, retTyp = rtFloat): untyped =
toBuf($v)
let ret = buf.parseNumber(sep = ',',
let ret = buf.parseNumber(sep = ',', quote = '#',
idxIn = 0,
intBuf, floatBuf)
if class notin {fcNan, fcInf, fcNegInf}:
Expand Down Expand Up @@ -115,7 +115,7 @@ suite "`parseNumber` tests":
initBuf()
template checkFloat(str, val: typed, start: int, retTyp = rtFloat, class = fcNormal): untyped =
toBuf(str)
let ret = buf.parseNumber(sep = ',',
let ret = buf.parseNumber(sep = ',', quote = '#',
idxIn = start,
intBuf, floatBuf)
if class notin {fcNan, fcInf, fcNegInf}:
Expand Down Expand Up @@ -179,7 +179,7 @@ suite "`parseNumber` tests":
initBuf()
template checkFloat(str: typed, start: int, retTyp = rtFloat, class = fcNormal): untyped =
toBuf(str)
let ret = buf.parseNumber(sep = ',',
let ret = buf.parseNumber(sep = ',', quote = '#',
idxIn = start,
intBuf, floatBuf)
check ret == retTyp
Expand Down Expand Up @@ -214,7 +214,7 @@ suite "`parseNumber` tests":
initBuf()
template checkFloat(str: typed, start: int, retTyp = rtFloat, class = fcNormal): untyped =
toBuf(str)
let ret = buf.parseNumber(sep = ',',
let ret = buf.parseNumber(sep = ',', quote = '#',
idxIn = start,
intBuf, floatBuf)
check ret == retTyp
Expand Down

0 comments on commit 8a26c32

Please sign in to comment.