From b5fabcb26b3aa02bf6ca0946060f0e5976715b95 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Tue, 28 Jun 2011 08:38:55 +0100 Subject: [PATCH] Updated glue script to work relative to script dir, then regenerated single header --- glueHeaders.py | 6 ++-- single_include/catch.hpp | 74 ---------------------------------------- 2 files changed, 3 insertions(+), 77 deletions(-) diff --git a/glueHeaders.py b/glueHeaders.py index f33ddff5..676c4193 100644 --- a/glueHeaders.py +++ b/glueHeaders.py @@ -1,12 +1,12 @@ import os +import sys import re -from sets import Set includesParser = re.compile( r'\s*#include\s*"(.*)"' ) guardParser = re.compile( r'\s*#.*_INCLUDED') defineParser = re.compile( r'\s*#define') -seenHeaders = Set([]) -rootPath = '/TwoBlueCubes/Dev/GitHub/Catch/include/' +seenHeaders = set([]) +rootPath = os.path.join( os.path.realpath(os.path.dirname(sys.argv[0])), 'include/' ) def parseFile( path, filename ): f = open( path + filename, 'r' ) diff --git a/single_include/catch.hpp b/single_include/catch.hpp index 5fc66f44..3b14c968 100644 --- a/single_include/catch.hpp +++ b/single_include/catch.hpp @@ -436,61 +436,6 @@ namespace Catch -// #included from: catch_descriptor.hpp - -/* - * catch_descriptor.hpp - * Catch - * - * Created by Phil on 16/06/2011. - * Copyright 2011 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) - * - */ - -#define TWOBLUECUBES_CATCH_DESCRIPTOR_HPP_INCLUDED - -namespace Catch -{ - - class Descriptor - { - public: - Descriptor() - : Anon( *this ) - { - } - - Descriptor& Name( const char* name ) - { - m_name = name; - return *this; - } - Descriptor& Desc( const char* desc ) - { - m_desc = desc; - return *this; - } - Descriptor& Tag( const char* tag ) - { - m_tags.push_back( tag ); - return *this; - } - - Descriptor& Anon; - - private: - - const char* m_name; - const char* m_desc; - std::vector m_tags; - }; - -} - - namespace Catch { @@ -561,13 +506,6 @@ struct AutoReg std::size_t line ); - AutoReg - ( TestFunction function, - const Descriptor& descriptor, - const char* filename, - std::size_t line - ); - /////////////////////////////////////////////////////////////////////////// template AutoReg @@ -3051,18 +2989,6 @@ namespace Catch registerTestCase( new FreeFunctionTestCase( function ), name, description, filename, line ); } - /////////////////////////////////////////////////////////////////////////// - AutoReg::AutoReg - ( - TestFunction function, - const Descriptor& descriptor, - const char* filename, - std::size_t line - ) - { - registerTestCase( new FreeFunctionTestCase( function ), "tbd", "tbd", filename, line ); - } - /////////////////////////////////////////////////////////////////////////// AutoReg::~AutoReg ()