diff options
author | flywind <43030857+xflywind@users.noreply.github.com> | 2020-12-04 05:59:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-03 22:59:17 +0100 |
commit | e4e5a0c65ab10f48746f8f9b2417e8ca69724a04 (patch) | |
tree | 742bed8b309f8796e7fdd42025121a7d50c7069a /tests/system/tstrmantle.nim | |
parent | 808ab7eae22536167445818c9a4650d36e87d39a (diff) | |
download | Nim-e4e5a0c65ab10f48746f8f9b2417e8ca69724a04.tar.gz |
cleanup docs and tests (#16235)
* js module also uses runnableExamples * cleanup docs and tests
Diffstat (limited to 'tests/system/tstrmantle.nim')
-rw-r--r-- | tests/system/tstrmantle.nim | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/system/tstrmantle.nim b/tests/system/tstrmantle.nim index 5b232193e..1f195adde 100644 --- a/tests/system/tstrmantle.nim +++ b/tests/system/tstrmantle.nim @@ -5,42 +5,42 @@ for i in 0 .. 9: doAssert res == "0123456789" -res = newStringOfCap(24) +res.setLen(0) for i in -9 .. 0: res.addInt int64(i) doAssert res == "-9-8-7-6-5-4-3-2-10" -res = newStringOfCap(24) +res.setLen(0) res.addInt high(int64) doAssert res == "9223372036854775807" -res = newStringOfCap(24) +res.setLen(0) res.addInt low(int64) doAssert res == "-9223372036854775808" -res = newStringOfCap(12) +res.setLen(0) res.addInt high(int32) doAssert res == "2147483647" -res = newStringOfCap(12) +res.setLen(0) res.addInt low(int32) doAssert res == "-2147483648" -res = newStringOfCap(12) +res.setLen(0) res.addInt high(int16) doAssert res == "32767" -res = newStringOfCap(212) +res.setLen(0) res.addInt low(int16) doAssert res == "-32768" -res = newStringOfCap(12) +res.setLen(0) res.addInt high(int8) doAssert res == "127" -res = newStringOfCap(12) +res.setLen(0) res.addInt low(int8) doAssert res == "-128" |