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

summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorPhil Nash2010-11-12 19:52:36 +0000
committerPhil Nash2010-11-12 19:52:36 +0000
commitc6177be3bcf874eedbb4a6dbfdf69cffae6c8647 (patch)
tree98fcaf8c3b4c8dac9b9073becefb58578c3926ca
parent0c65b0a2ec025039928c3500c24720a9a4ebac44 (diff)
downloadcatch3-c6177be3bcf874eedbb4a6dbfdf69cffae6c8647.tar.gz
Moved catch_runnerconfig.hpp into internal
-rw-r--r--Test/Test.xcodeproj/project.pbxproj4
-rw-r--r--catch_runnerconfig.hpp127
2 files changed, 2 insertions, 129 deletions
diff --git a/Test/Test.xcodeproj/project.pbxproj b/Test/Test.xcodeproj/project.pbxproj
index 01a00912..4cb5cb97 100644
--- a/Test/Test.xcodeproj/project.pbxproj
+++ b/Test/Test.xcodeproj/project.pbxproj
@@ -31,6 +31,7 @@
/* Begin PBXFileReference section */
4A3BFFB8128DCF06005609E3 /* TestMain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TestMain.cpp; sourceTree = "<group>"; };
+ 4A3BFFF0128DD23C005609E3 /* catch_runnerconfig.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_runnerconfig.hpp; path = ../internal/catch_runnerconfig.hpp; sourceTree = SOURCE_ROOT; };
4AFC341512809A36003A0C29 /* catch_capture.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_capture.hpp; path = ../internal/catch_capture.hpp; sourceTree = SOURCE_ROOT; };
4AFC341612809A36003A0C29 /* catch_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = catch_common.h; path = ../internal/catch_common.h; sourceTree = SOURCE_ROOT; };
4AFC341712809A36003A0C29 /* catch_registry.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_registry.hpp; path = ../internal/catch_registry.hpp; sourceTree = SOURCE_ROOT; };
@@ -46,7 +47,6 @@
4AFC346412809D41003A0C29 /* catch_commandline.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_commandline.hpp; path = ../internal/catch_commandline.hpp; sourceTree = SOURCE_ROOT; };
4AFC359B1281F00B003A0C29 /* catch_section.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_section.hpp; path = ../internal/catch_section.hpp; sourceTree = SOURCE_ROOT; };
4AFC38161284B387003A0C29 /* catch_runner.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_runner.hpp; path = ../catch_runner.hpp; sourceTree = SOURCE_ROOT; };
- 4AFC384F1287E33E003A0C29 /* catch_runnerconfig.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = catch_runnerconfig.hpp; path = ../catch_runnerconfig.hpp; sourceTree = SOURCE_ROOT; };
4AFC38CC12887D80003A0C29 /* ConditionTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ConditionTests.cpp; sourceTree = "<group>"; };
4AFC3A9812893C56003A0C29 /* ExceptionTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExceptionTests.cpp; sourceTree = "<group>"; };
4AFC3AA812893E54003A0C29 /* MessageTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MessageTests.cpp; sourceTree = "<group>"; };
@@ -115,6 +115,7 @@
4AFC341412809A1B003A0C29 /* Internal */ = {
isa = PBXGroup;
children = (
+ 4A3BFFF0128DD23C005609E3 /* catch_runnerconfig.hpp */,
4AFC341F12809A45003A0C29 /* catch_list.hpp */,
4AFC359B1281F00B003A0C29 /* catch_section.hpp */,
4AFC346412809D41003A0C29 /* catch_commandline.hpp */,
@@ -125,7 +126,6 @@
4AFC341912809A36003A0C29 /* catch_resultinfo.hpp */,
4AFC341A12809A36003A0C29 /* catch_runner_impl.hpp */,
4AFC341B12809A36003A0C29 /* catch_testcaseinfo.hpp */,
- 4AFC384F1287E33E003A0C29 /* catch_runnerconfig.hpp */,
);
name = Internal;
sourceTree = "<group>";
diff --git a/catch_runnerconfig.hpp b/catch_runnerconfig.hpp
deleted file mode 100644
index 2eb38e4e..00000000
--- a/catch_runnerconfig.hpp
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * catch_runnerconfig.hpp
- * Catch
- *
- * Created by Phil on 08/11/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_RUNNERCONFIG_HPP_INCLUDED
-#define TWOBLUECUBES_CATCH_RUNNERCONFIG_HPP_INCLUDED
-
-#include "catch_reporter_registry.hpp"
-
-#include <memory>
-#include <vector>
-#include <string>
-
-namespace Catch
-{
- class RunnerConfig
- {
- public:
-
- enum ListInfo
- {
- listNone = 0,
-
- listReports = 1,
- listTests = 2,
- listAll = 3,
-
- listWhatMask = 0xf,
-
- listAsText = 0x10,
- listAsXml = 0x11,
-
- listAsMask = 0xf0
- };
-
-
- RunnerConfig()
- : m_listSpec( listNone ),
- m_reporter( NULL )
- {}
-
- void setReporterInfo( const std::string& reporterName )
- {
- if( m_reporter.get() )
- return setError( "Only one reporter may be specified" );
- setReporter( ReporterRegistry::instance().create( reporterName, m_reporterConfig ) );
- }
-
- void addTestSpec( const std::string& testSpec )
- {
- m_testSpecs.push_back( testSpec );
- }
- void setListSpec( ListInfo listSpec )
- {
- m_listSpec = listSpec;
- }
-
- void setFilename( const std::string& filename )
- {
- m_filename = filename;
- }
-
- std::string getFilename()
- {
- return m_filename;
- }
-
- void setError( const std::string& errorMessage )
- {
- m_message = errorMessage + "\n\n" + "Usage: ...";
- }
-
- void setReporter( ITestReporter* reporter )
- {
- m_reporter = std::auto_ptr<ITestReporter>( reporter );
- }
-
- ITestReporter* getReporter()
- {
- if( !m_reporter.get() )
- setReporter( ReporterRegistry::instance().create( "basic", m_reporterConfig ) );
- return m_reporter.get();
- }
-
- const ITestReporter* getReporter() const
- {
- return const_cast<RunnerConfig*>( this )->getReporter();
- }
-
- ListInfo listWhat() const
- {
- return (ListInfo)( m_listSpec & listWhatMask );
- }
-
- ListInfo listAs() const
- {
- return (ListInfo)( m_listSpec & listAsMask );
- }
-
- ReporterConfig& getReporterConfig()
- {
- return m_reporterConfig;
- }
- void setIncludeAll( bool includeAll )
- {
- m_reporterConfig.setIncludeWhat( includeAll ? ReporterConfig::Include::SuccessfulResults : ReporterConfig::Include::FailedOnly );
- }
-
- std::auto_ptr<ITestReporter> m_reporter;
- std::string m_filename;
- ReporterConfig m_reporterConfig;
- std::string m_message;
- ListInfo m_listSpec;
- std::vector<std::string> m_testSpecs;
- };
-
-} // end namespace Catch
-
-#endif // TWOBLUECUBES_CATCH_RUNNERCONFIG_HPP_INCLUDED