mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-23 21:15:39 +02:00
Refactored a lot of code from headers into impl headers only compiled into one TU
- also added noimpl option to single header script - which only generates the non impl code
This commit is contained in:
@@ -56,9 +56,6 @@ namespace Catch {
|
||||
|
||||
namespace Detail{
|
||||
|
||||
inline bool startsWith( std::string const& str, std::string const& sub ) {
|
||||
return str.length() > sub.length() && str.substr( 0, sub.length() ) == sub;
|
||||
}
|
||||
|
||||
inline std::string getAnnotation( Class cls,
|
||||
std::string const& annotationName,
|
||||
@@ -88,7 +85,7 @@ namespace Catch {
|
||||
for( u_int m = 0; m < count ; m++ ) {
|
||||
SEL selector = method_getName(methods[m]);
|
||||
std::string methodName = sel_getName(selector);
|
||||
if( Detail::startsWith( methodName, "Catch_TestCase_" ) ) {
|
||||
if( startsWith( methodName, "Catch_TestCase_" ) ) {
|
||||
std::string testCaseName = methodName.substr( 15 );
|
||||
std::string name = Detail::getAnnotation( cls, "Name", testCaseName );
|
||||
std::string desc = Detail::getAnnotation( cls, "Description", testCaseName );
|
||||
|
Reference in New Issue
Block a user