Harmonize the APIs and the coding practices in input_stream and output_stream
This commit is contained in:
parent
fa415774c3
commit
3efad6f7f2
4 changed files with 186 additions and 155 deletions
|
|
@ -21,14 +21,14 @@ proc randomBytes(n: int): seq[byte] =
|
|||
|
||||
suite "output stream":
|
||||
setup:
|
||||
var memStream = OutputStream.init
|
||||
var memStream = memoryOutput()
|
||||
var altOutput: seq[byte] = @[]
|
||||
var tempFilePath = getTempDir() / "faststreams_testfile"
|
||||
var fileStream = OutputStream.init tempFilePath
|
||||
var fileStream = fileOutput(tempFilePath)
|
||||
|
||||
const bufferSize = 1000000
|
||||
var buffer = alloc(bufferSize)
|
||||
var existingBufferStream = OutputStream.init(buffer, bufferSize)
|
||||
var existingBufferStream = memoryOutput(buffer, bufferSize)
|
||||
|
||||
teardown:
|
||||
removeFile tempFilePath
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue