mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-17 02:25:38 +02:00
Port the last example
This commit is contained in:
@@ -6,10 +6,12 @@
|
||||
// there is no important difference between having `std::cerr` buffered
|
||||
// or unbuffered.
|
||||
|
||||
#define CATCH_CONFIG_NOSTDOUT
|
||||
#define CATCH_CONFIG_MAIN
|
||||
#include <catch2/catch_default_main.hpp>
|
||||
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
#include <sstream>
|
||||
#include <cstdio>
|
||||
|
||||
class out_buff : public std::stringbuf {
|
||||
std::FILE* m_stream;
|
||||
|
@@ -17,8 +17,11 @@ add_executable( 020-MultiFile
|
||||
020-TestCase-2.cpp
|
||||
)
|
||||
|
||||
# TODO: How to handle differently configured libraries?
|
||||
# Needed in 231-Cfg-OutputStreams
|
||||
add_executable(231-Cfg_OutputStreams
|
||||
231-Cfg-OutputStreams.cpp
|
||||
)
|
||||
StampOutLibrary(231-Cfg_OutputStreams)
|
||||
target_compile_definitions(Catch2_231-Cfg_OutputStreams PUBLIC CATCH_CONFIG_NOSTDOUT)
|
||||
|
||||
# These examples use the standard separate compilation
|
||||
set( SOURCES_IDIOMATIC_EXAMPLES
|
||||
|
Reference in New Issue
Block a user