mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
moved impl of hub out into hub_impl - only #included from runner.
This commit is contained in:
parent
18e32b9b9f
commit
aca80a171b
31
Test/catch_hub_impl.hpp
Normal file
31
Test/catch_hub_impl.hpp
Normal file
@ -0,0 +1,31 @@
|
||||
/*
|
||||
* catch_hub_impl.hpp
|
||||
* Test
|
||||
*
|
||||
* Created by Phil on 31/12/2010.
|
||||
* Copyright 2010 Two Blue Cubes Ltd. All rights reserved.
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
#ifndef TWOBLUECUBES_CATCH_HUB_IMPL_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_HUB_IMPL_HPP_INCLUDED
|
||||
|
||||
#include "catch_hub.h"
|
||||
#include "catch_reporter_registry.hpp"a
|
||||
|
||||
namespace Catch
|
||||
{
|
||||
inline Hub::Hub()
|
||||
: m_reporterRegistry( new ReporterRegistry )
|
||||
{
|
||||
}
|
||||
|
||||
inline IReporterRegistry& Hub::getReporterRegistry()
|
||||
{
|
||||
return *me().m_reporterRegistry.get();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // TWOBLUECUBES_CATCH_HUB_IMPL_HPP_INCLUDED
|
@ -26,7 +26,7 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_HPP_INCLUDED
|
||||
|
||||
#include "internal/catch_hub.hpp"
|
||||
#include "internal/catch_hub.h"
|
||||
#include "internal/catch_registry.hpp"
|
||||
#include "internal/catch_capture.hpp"
|
||||
#include "internal/catch_section.hpp"
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include "catch_reporter_basic.hpp"
|
||||
#include "catch_reporter_xml.hpp"
|
||||
#include "catch_reporter_junit.hpp"
|
||||
#include "catch_hub_impl.hpp"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* catch_hub.hpp
|
||||
* catch_hub.h
|
||||
* Test
|
||||
*
|
||||
* Created by Phil on 31/12/2010.
|
||||
@ -9,8 +9,8 @@
|
||||
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*
|
||||
*/
|
||||
#ifndef TWOBLUECUBES_CATCH_HUB_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_HUB_HPP_INCLUDED
|
||||
#ifndef TWOBLUECUBES_CATCH_HUB_H_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_HUB_H_INCLUDED
|
||||
|
||||
#include <memory>
|
||||
|
||||
@ -38,22 +38,5 @@ namespace Catch
|
||||
std::auto_ptr<IReporterRegistry> m_reporterRegistry;
|
||||
};
|
||||
}
|
||||
|
||||
////// -- new file --
|
||||
|
||||
#include "catch_reporter_registry.hpp"
|
||||
|
||||
namespace Catch
|
||||
{
|
||||
inline Hub::Hub()
|
||||
: m_reporterRegistry( new ReporterRegistry )
|
||||
{
|
||||
}
|
||||
|
||||
inline IReporterRegistry& Hub::getReporterRegistry()
|
||||
{
|
||||
return *me().m_reporterRegistry.get();
|
||||
}
|
||||
}
|
||||
|
||||
#endif // TWOBLUECUBES_CATCH_HUB_HPP_INCLUDED
|
||||
#endif // TWOBLUECUBES_CATCH_HUB_H_INCLUDED
|
@ -23,8 +23,8 @@ namespace Catch
|
||||
if( config.listWhat() & RunnerConfig::listReports )
|
||||
{
|
||||
std::cout << "Available reports:\n";
|
||||
ReporterRegistry::FactoryMap::const_iterator it = Hub::getReporterRegistry().getFactories().begin();
|
||||
ReporterRegistry::FactoryMap::const_iterator itEnd = Hub::getReporterRegistry().getFactories().end();
|
||||
IReporterRegistry::FactoryMap::const_iterator it = Hub::getReporterRegistry().getFactories().begin();
|
||||
IReporterRegistry::FactoryMap::const_iterator itEnd = Hub::getReporterRegistry().getFactories().end();
|
||||
for(; it != itEnd; ++it )
|
||||
{
|
||||
// !TBD: consider listAs()
|
||||
|
@ -12,7 +12,7 @@
|
||||
#ifndef TWOBLUECUBES_CATCH_REPORTER_REGISTRARS_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_REPORTER_REGISTRARS_HPP_INCLUDED
|
||||
|
||||
#include "catch_hub.hpp"
|
||||
#include "catch_hub.h"
|
||||
|
||||
namespace Catch
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user