mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21:36:11 +01:00
Change provideBazelReporterOutput to local linkage
This commit is contained in:
parent
7e4ec432d0
commit
165647abbc
@ -13,10 +13,29 @@
|
|||||||
#include <catch2/internal/catch_test_spec_parser.hpp>
|
#include <catch2/internal/catch_test_spec_parser.hpp>
|
||||||
#include <catch2/interfaces/catch_interfaces_tag_alias_registry.hpp>
|
#include <catch2/interfaces/catch_interfaces_tag_alias_registry.hpp>
|
||||||
|
|
||||||
namespace Catch {
|
namespace {
|
||||||
|
bool provideBazelReporterOutput() {
|
||||||
|
#ifdef CATCH_CONFIG_BAZEL_SUPPORT
|
||||||
|
return true;
|
||||||
|
#else
|
||||||
|
|
||||||
// Requires declaration for -Wmissing-declarations.
|
# if defined( _MSC_VER )
|
||||||
bool provideBazelReporterOutput();
|
// On Windows getenv throws a warning as there is no input validation,
|
||||||
|
// since the switch is hardcoded, this should not be an issue.
|
||||||
|
# pragma warning( push )
|
||||||
|
# pragma warning( disable : 4996 )
|
||||||
|
# endif
|
||||||
|
|
||||||
|
return std::getenv( "BAZEL_TEST" ) != nullptr;
|
||||||
|
|
||||||
|
# if defined( _MSC_VER )
|
||||||
|
# pragma warning( pop )
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace Catch {
|
||||||
|
|
||||||
bool operator==( ProcessedReporterSpec const& lhs,
|
bool operator==( ProcessedReporterSpec const& lhs,
|
||||||
ProcessedReporterSpec const& rhs ) {
|
ProcessedReporterSpec const& rhs ) {
|
||||||
@ -116,26 +135,6 @@ namespace Catch {
|
|||||||
bool Config::listReporters() const { return m_data.listReporters; }
|
bool Config::listReporters() const { return m_data.listReporters; }
|
||||||
bool Config::listListeners() const { return m_data.listListeners; }
|
bool Config::listListeners() const { return m_data.listListeners; }
|
||||||
|
|
||||||
bool provideBazelReporterOutput() {
|
|
||||||
#ifdef CATCH_CONFIG_BAZEL_SUPPORT
|
|
||||||
return true;
|
|
||||||
#else
|
|
||||||
|
|
||||||
# if defined( _MSC_VER )
|
|
||||||
// On Windows getenv throws a warning as there is no input validation,
|
|
||||||
// since the switch is hardcoded, this should not be an issue.
|
|
||||||
# pragma warning( push )
|
|
||||||
# pragma warning( disable : 4996 )
|
|
||||||
# endif
|
|
||||||
|
|
||||||
return std::getenv("BAZEL_TEST") != nullptr;
|
|
||||||
|
|
||||||
# if defined( _MSC_VER )
|
|
||||||
# pragma warning( pop )
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
std::vector<std::string> const& Config::getTestsOrTags() const { return m_data.testsOrTags; }
|
std::vector<std::string> const& Config::getTestsOrTags() const { return m_data.testsOrTags; }
|
||||||
std::vector<std::string> const& Config::getSectionsToRun() const { return m_data.sectionsToRun; }
|
std::vector<std::string> const& Config::getSectionsToRun() const { return m_data.sectionsToRun; }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user