forked from catchorg/Catch2
catch_discover_tests uses tempfile to retrieve JSON from the binary
This allows it to deal with badly behaved code, where 3rd party dependencies write into stdout during global construction. Closes #3162 Closes #3166
This commit is contained in:
@@ -8,6 +8,24 @@
|
||||
|
||||
#include <catch2/catch_test_macros.hpp>
|
||||
|
||||
#include <cstdio>
|
||||
#include <iostream>
|
||||
|
||||
namespace {
|
||||
|
||||
struct PrintsWhenConstructed {
|
||||
PrintsWhenConstructed() {
|
||||
std::cout << "Hello\n";
|
||||
std::cerr << "Holla\n";
|
||||
std::fprintf(stdout, "Hullo\n");
|
||||
std::fprintf(stderr, "Hillo\n");
|
||||
}
|
||||
};
|
||||
|
||||
static PrintsWhenConstructed instance;
|
||||
|
||||
}
|
||||
|
||||
TEST_CASE("@Script[C:\\EPM1A]=x;\"SCALA_ZERO:\"", "[script regressions]"){}
|
||||
TEST_CASE("Some test") {}
|
||||
TEST_CASE( "Let's have a test case with a long name. Longer. No, even longer. "
|
||||
|
||||
Reference in New Issue
Block a user