Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2022-02-21 23:48:15 +0100
committerMartin Hořeňovský2022-02-22 15:45:51 +0100
commit715cd25081f008a4540cbcded266f400c9c57a2d (patch)
tree4194201680e112f8b79c8456d8cb6368ac5369f6 /tests/SelfTest/IntrospectiveTests/Stream.tests.cpp
parent1d4b42ad7bd8f7fc6be91b959d881d874f6fed0d (diff)
downloadcatch3-715cd25081f008a4540cbcded266f400c9c57a2d.tar.gz
Add IStream::isStdOut
Diffstat (limited to 'tests/SelfTest/IntrospectiveTests/Stream.tests.cpp')
-rw-r--r--tests/SelfTest/IntrospectiveTests/Stream.tests.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp b/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp
new file mode 100644
index 00000000..8a3aad46
--- /dev/null
+++ b/tests/SelfTest/IntrospectiveTests/Stream.tests.cpp
@@ -0,0 +1,19 @@
+
+// Copyright Catch2 Authors
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// https://www.boost.org/LICENSE_1_0.txt)
+
+// SPDX-License-Identifier: BSL-1.0
+
+#include <catch2/catch_test_macros.hpp>
+
+#include <catch2/internal/catch_stream.hpp>
+
+TEST_CASE( "Cout stream properly declares it writes to stdout", "[streams]" ) {
+ REQUIRE( Catch::makeStream( "-" )->isStdout() );
+}
+
+TEST_CASE( "Empty stream name opens cout stream", "[streams]" ) {
+ REQUIRE( Catch::makeStream( "" )->isStdout() );
+}