mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-04 05:09:53 +01:00
Made Clara a “Cliche” header, which will be usable independently of Catch.
- This is just a first step. It still has a dependency on catch_text.h, which also needs to be made a Cliche header. - These then need their own homes on GitHub.
This commit is contained in:
parent
7eb5acc183
commit
4554155e3d
16
include/internal/catch_clara.h
Normal file
16
include/internal/catch_clara.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
/*
|
||||||
|
* Created by Phil on 10/2/2014.
|
||||||
|
* Copyright 2014 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_CLARA_H_INCLUDED
|
||||||
|
#define TWOBLUECUBES_CATCH_CLARA_H_INCLUDED
|
||||||
|
|
||||||
|
#define CLICHE_CLARA_EMBEDDED_NAMESPACE Catch
|
||||||
|
#include "clara.h"
|
||||||
|
#undef CLICHE_CLARA_EMBEDDED_NAMESPACE
|
||||||
|
|
||||||
|
#endif // TWOBLUECUBES_CATCH_CLARA_H_INCLUDED
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include "catch_config.hpp"
|
#include "catch_config.hpp"
|
||||||
#include "catch_common.h"
|
#include "catch_common.h"
|
||||||
#include "clara.h"
|
#include "catch_clara.h"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
||||||
|
@ -5,11 +5,22 @@
|
|||||||
* Distributed under the Boost Software License, Version 1.0. (See accompanying
|
* 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)
|
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||||
*/
|
*/
|
||||||
#ifndef TWOBLUECUBES_CLARA_H_INCLUDED
|
#ifndef CLICHE_CLARA_EMBEDDED_NAMESPACE
|
||||||
|
#ifdef TWOBLUECUBES_CLARA_H_INCLUDED
|
||||||
|
#define TWOBLUECUBES_CLARA_H_ALREADY_INCLUDED
|
||||||
|
#else
|
||||||
#define TWOBLUECUBES_CLARA_H_INCLUDED
|
#define TWOBLUECUBES_CLARA_H_INCLUDED
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef TWOBLUECUBES_CLARA_H_ALREADY_INCLUDED
|
||||||
|
|
||||||
#include "catch_text.h" // This will get moved out too
|
#include "catch_text.h" // This will get moved out too
|
||||||
|
|
||||||
|
#ifdef CLICHE_CLARA_EMBEDDED_NAMESPACE
|
||||||
|
namespace CLICHE_CLARA_EMBEDDED_NAMESPACE {
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Clara {
|
namespace Clara {
|
||||||
namespace Detail {
|
namespace Detail {
|
||||||
template<typename T> struct RemoveConstRef{ typedef T type; };
|
template<typename T> struct RemoveConstRef{ typedef T type; };
|
||||||
@ -582,5 +593,9 @@ namespace Clara {
|
|||||||
|
|
||||||
} // end namespace Clara
|
} // end namespace Clara
|
||||||
|
|
||||||
|
#ifdef CLICHE_CLARA_EMBEDDED_NAMESPACE
|
||||||
|
} // end embedded namespace
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // TWOBLUECUBES_CLARA_H_ALREAD_INCLUDED
|
||||||
|
|
||||||
#endif // TWOBLUECUBES_CLARA_H_INCLUDED
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
template<size_t size>
|
template<size_t size>
|
||||||
void parseIntoConfig( const char * (&argv)[size], Catch::ConfigData& config ) {
|
void parseIntoConfig( const char * (&argv)[size], Catch::ConfigData& config ) {
|
||||||
Clara::CommandLine<Catch::ConfigData> parser = Catch::makeCommandLineParser();
|
Catch::Clara::CommandLine<Catch::ConfigData> parser = Catch::makeCommandLineParser();
|
||||||
parser.parseInto( size, argv, config );
|
parser.parseInto( size, argv, config );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -77,6 +77,7 @@
|
|||||||
26847E5B16BBAB790043B9C1 /* catch_message.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_message.h; sourceTree = "<group>"; };
|
26847E5B16BBAB790043B9C1 /* catch_message.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_message.h; sourceTree = "<group>"; };
|
||||||
26847E5C16BBACB60043B9C1 /* catch_message.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_message.hpp; sourceTree = "<group>"; };
|
26847E5C16BBACB60043B9C1 /* catch_message.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_message.hpp; sourceTree = "<group>"; };
|
||||||
26847E5D16BBADB40043B9C1 /* catch_message.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_message.cpp; path = ../../../SelfTest/SurrogateCpps/catch_message.cpp; sourceTree = "<group>"; };
|
26847E5D16BBADB40043B9C1 /* catch_message.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = catch_message.cpp; path = ../../../SelfTest/SurrogateCpps/catch_message.cpp; sourceTree = "<group>"; };
|
||||||
|
268F47B018A93F7800D8C14F /* catch_clara.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = catch_clara.h; sourceTree = "<group>"; };
|
||||||
26948284179A9AB900ED166E /* SectionTrackerTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SectionTrackerTests.cpp; path = ../../../SelfTest/SectionTrackerTests.cpp; sourceTree = "<group>"; };
|
26948284179A9AB900ED166E /* SectionTrackerTests.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SectionTrackerTests.cpp; path = ../../../SelfTest/SectionTrackerTests.cpp; sourceTree = "<group>"; };
|
||||||
26948287179EF7F900ED166E /* catch_test_case_tracker.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_test_case_tracker.hpp; sourceTree = "<group>"; };
|
26948287179EF7F900ED166E /* catch_test_case_tracker.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; path = catch_test_case_tracker.hpp; sourceTree = "<group>"; };
|
||||||
2694A1FB16A0000E004816E3 /* catch_text.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = catch_text.cpp; sourceTree = "<group>"; };
|
2694A1FB16A0000E004816E3 /* catch_text.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = catch_text.cpp; sourceTree = "<group>"; };
|
||||||
@ -438,6 +439,7 @@
|
|||||||
26AEAF1617BEA18E009E32C9 /* catch_platform.h */,
|
26AEAF1617BEA18E009E32C9 /* catch_platform.h */,
|
||||||
262E739A1846759000CAC268 /* catch_common.hpp */,
|
262E739A1846759000CAC268 /* catch_common.hpp */,
|
||||||
261488FC184D1DC10041FBEB /* catch_stream.h */,
|
261488FC184D1DC10041FBEB /* catch_stream.h */,
|
||||||
|
268F47B018A93F7800D8C14F /* catch_clara.h */,
|
||||||
);
|
);
|
||||||
name = Infrastructure;
|
name = Infrastructure;
|
||||||
sourceTree = "<group>";
|
sourceTree = "<group>";
|
||||||
|
Loading…
Reference in New Issue
Block a user