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

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/internal/catch_stdstreams.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2022-04-16 14:12:56 +0200
committerMartin Hořeňovský2022-04-16 16:33:50 +0200
commit05e85c5652480b584287f406b2170f61b02d560c (patch)
tree9ffc1e68450480f16dfc67e1a88a5890d7b56c9d /src/catch2/internal/catch_stdstreams.cpp
parentb5202576766c63a29275a8386a8e3c0439089382 (diff)
downloadcatch3-05e85c5652480b584287f406b2170f61b02d560c.tar.gz
Split out Catch::cout/cerr/clog into their own file
Diffstat (limited to 'src/catch2/internal/catch_stdstreams.cpp')
-rw-r--r--src/catch2/internal/catch_stdstreams.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/catch2/internal/catch_stdstreams.cpp b/src/catch2/internal/catch_stdstreams.cpp
new file mode 100644
index 00000000..21a0e4e6
--- /dev/null
+++ b/src/catch2/internal/catch_stdstreams.cpp
@@ -0,0 +1,24 @@
+
+// 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/internal/catch_stdstreams.hpp>
+
+#include <catch2/catch_user_config.hpp>
+
+#include <iostream>
+
+namespace Catch {
+
+// If you #define this you must implement these functions
+#if !defined( CATCH_CONFIG_NOSTDOUT )
+ std::ostream& cout() { return std::cout; }
+ std::ostream& cerr() { return std::cerr; }
+ std::ostream& clog() { return std::clog; }
+#endif
+
+} // namespace Catch