fixes output stream casting problem
This commit is contained in:
parent
12250ec3ed
commit
e7a34b74f2
2 changed files with 15 additions and 2 deletions
|
|
@ -58,7 +58,7 @@ suite "output stream":
|
|||
test "append zero length slice":
|
||||
output ""
|
||||
checkOutputsMatch()
|
||||
|
||||
|
||||
test "string output":
|
||||
for i in 0 .. 1:
|
||||
output $i
|
||||
|
|
@ -150,3 +150,14 @@ suite "output stream":
|
|||
# The final outputs are the same
|
||||
check altOutput == memStream.getOutput
|
||||
|
||||
test "nim odd behavior":
|
||||
# discovered in status-im/nim-snappy#2
|
||||
proc encode(s: OutputStreamVar) =
|
||||
check true
|
||||
|
||||
proc abc(s: OutputStreamVar) =
|
||||
OutputStreamVar(s.outputDevice).encode
|
||||
check true
|
||||
|
||||
var os = new OutputStream
|
||||
os.abc()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue