mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-04 05:59:32 +01:00 
			
		
		
		
	Updated glue script to work relative to script dir, then regenerated single header
This commit is contained in:
		@@ -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' )
 | 
			
		||||
 
 | 
			
		||||
@@ -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<const char*> 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<typename C>
 | 
			
		||||
    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
 | 
			
		||||
    ()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user