From ce12e1d64d6b0b62609f061d3773a7e8b35849c3 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 30 Nov 2021 16:50:05 -0500 Subject: Auto flush for streams for stdin/out in slang-test (#2035) * #include an absolute path didn't work - because paths were taken to always be relative. * Move StreamType from Process to StdStreamType in slang-stream.h * Disable buffering for stdout/stderr for slang-test. * Improve comment. --- tools/slang-unit-test/unit-test-process.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tools/slang-unit-test/unit-test-process.cpp') diff --git a/tools/slang-unit-test/unit-test-process.cpp b/tools/slang-unit-test/unit-test-process.cpp index 77f03ddee..559522769 100644 --- a/tools/slang-unit-test/unit-test-process.cpp +++ b/tools/slang-unit-test/unit-test-process.cpp @@ -33,8 +33,8 @@ static SlangResult _httpReflectTest(UnitTestContext* context) RefPtr process; SLANG_RETURN_ON_FAIL(_createProcess(context, "http-reflect", nullptr, process)); - Stream* writeStream = process->getStream(Process::StreamType::StdIn); - RefPtr readStream( new BufferedReadStream(process->getStream(Process::StreamType::StdOut))); + Stream* writeStream = process->getStream(StdStreamType::In); + RefPtr readStream( new BufferedReadStream(process->getStream(StdStreamType::Out))); RefPtr connection = new HTTPPacketConnection(readStream, writeStream); RefPtr rand = RandomGenerator::create(10000); @@ -163,8 +163,8 @@ static SlangResult _reflectTest(UnitTestContext* context) SLANG_RETURN_ON_FAIL(_createProcess(context, "reflect", nullptr, process)); // Write a bunch of stuff to the stream - Stream* readStream = process->getStream(Process::StreamType::StdOut); - Stream* writeStream = process->getStream(Process::StreamType::StdIn); + Stream* readStream = process->getStream(StdStreamType::Out); + Stream* writeStream = process->getStream(StdStreamType::In); List readBuffer; -- cgit v1.2.3