Expand the documentation; Clean up debugging code; Enable all tests

This commit is contained in:
Zahary Karadjov 2020-05-05 19:20:25 +03:00
commit 18f9488bee
No known key found for this signature in database
GPG key ID: C8936F8A3073D609
11 changed files with 205 additions and 120 deletions

View file

@ -13,7 +13,7 @@ proc bytes(s: string): seq[byte] =
proc str(bytes: openarray[byte]): string =
result = newStringOfCap(bytes.len)
for b in bytes:
for b in items(bytes):
result.add b.char
proc countLines(s: InputStream): Natural =
@ -31,13 +31,15 @@ procSuite "input stream":
test "input is not readable with read":
check not input.readable
expect Defect:
echo "This read should not complete: ", input.read
when not defined(danger):
expect Defect:
echo "This read should not complete: ", input.read
test "input is not readable with read(n)":
check not input.readable(10)
expect Defect:
echo "This read should not complete: ", input.read(10)
when not defined(danger):
expect Defect:
echo "This read should not complete: ", input.read(10)
test "next returns none":
check input.next.isNone