1 /* 2 * Created by Phil on 27/6/2014. 3 * Copyright 2014 Two Blue Cubes Ltd. All rights reserved. 4 * 5 * Distributed under the Boost Software License, Version 1.0. (See accompanying 6 * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 7 */ 8 #ifndef TWOBLUECUBES_CATCH_TAG_ALIAS_H_INCLUDED 9 #define TWOBLUECUBES_CATCH_TAG_ALIAS_H_INCLUDED 10 11 #include "catch_common.h" 12 13 #include <string> 14 15 namespace Catch { 16 17 struct TagAlias { TagAliasTagAlias18 TagAlias( std::string const& _tag, SourceLineInfo _lineInfo ) : tag( _tag ), lineInfo( _lineInfo ) {} 19 20 std::string tag; 21 SourceLineInfo lineInfo; 22 }; 23 24 struct RegistrarForTagAliases { 25 RegistrarForTagAliases( char const* alias, char const* tag, SourceLineInfo const& lineInfo ); 26 }; 27 28 } // end namespace Catch 29 30 #endif // TWOBLUECUBES_CATCH_TAG_ALIAS_H_INCLUDED 31 32 #define CATCH_REGISTER_TAG_ALIAS( alias, spec ) namespace{ Catch::RegistrarForTagAliases INTERNAL_CATCH_UNIQUE_NAME( AutoRegisterTagAlias )( alias, spec, CATCH_INTERNAL_LINEINFO ); } 33