Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Added class name to Obj-C test case

Commit
7455c449ad2bacdb3cedd476178523924c06d9e6
Author
Phil Nash ·
Parents
51c69dbc3308

Files · Download .tar.gz

Changes

 .gitignore                      | 5 ++++-
 include/internal/catch_objc.hpp | 3 ++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index ccd16f6c..2b5048c6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,4 +14,7 @@ Breakpoints.xcbkptlist
 projects/VS2010/TestCatch/_UpgradeReport_Files/
 projects/VS2010/TestCatch/TestCatch/TestCatch.vcxproj.filters
 projects/VisualStudio/TestCatch/UpgradeLog.XML
-UpgradeLog.XML
\ No newline at end of file
+UpgradeLog.XML
+projects/XCode4/CatchSelfTest/DerivedData
+projects/XCode4/OCTest/DerivedData
+projects/XCode4/iOSTest/Build
diff --git a/include/internal/catch_objc.hpp b/include/internal/catch_objc.hpp
index fabfda8f..8666d4aa 100644
--- a/include/internal/catch_objc.hpp
+++ b/include/internal/catch_objc.hpp
@@ -92,8 +92,9 @@ namespace Catch {
                         std::string testCaseName = methodName.substr( 15 );
                         std::string name = Detail::getAnnotation( cls, "Name", testCaseName );
                         std::string desc = Detail::getAnnotation( cls, "Description", testCaseName );
+                        const char* className = class_getName( cls );
                         
-                        getMutableRegistryHub().registerTest( TestCaseInfo( new OcMethod( cls, selector ), name.c_str(), desc.c_str(), SourceLineInfo() ) );
+                        getMutableRegistryHub().registerTest( TestCaseInfo( new OcMethod( cls, selector ), className, name.c_str(), desc.c_str(), SourceLineInfo() ) );
                         noTestMethods++;
                     }
                 }