diff options
| author | Phil Nash | 2010-11-19 08:30:45 +0000 |
|---|---|---|
| committer | Phil Nash | 2010-11-19 08:30:45 +0000 |
| commit | 388e9ffde6e760a4a4e06104f4dbd1d4fff90137 (patch) | |
| tree | 8366ee607222204898c883a80e82230af615da9c | |
| parent | 5f43a43662c8b9feca25aeccc79d1c7db664c9a0 (diff) | |
| download | catch3-388e9ffde6e760a4a4e06104f4dbd1d4fff90137.tar.gz | |
Some work on sections
| -rw-r--r-- | internal/catch_capture.hpp | 7 | ||||
| -rw-r--r-- | internal/catch_section.hpp | 12 |
2 files changed, 18 insertions, 1 deletions
diff --git a/internal/catch_capture.hpp b/internal/catch_capture.hpp index 19d1a44d..1fea174e 100644 --- a/internal/catch_capture.hpp +++ b/internal/catch_capture.hpp @@ -261,6 +261,13 @@ public: { instance().currentResult.setMessage( msg ); } + static void acceptSectionStart( const std::string& name, const std::string& description ) + { + } + + static void acceptSectionEnd( const std::string& name ) + { + } private: MutableResultInfo currentResult; diff --git a/internal/catch_section.hpp b/internal/catch_section.hpp index 6eb802d6..a510ce87 100644 --- a/internal/catch_section.hpp +++ b/internal/catch_section.hpp @@ -21,15 +21,25 @@ namespace Catch { public: Section( const std::string& name, const std::string& description ) + : m_name( name ), m_description( description ) { - (name, description); // !TBD notify the runner + ResultsCapture::acceptSectionStart( name, description ); } + ~Section() + { + ResultsCapture::acceptSectionEnd( m_name ); + } + + // This returns whether the section should be included or not operator bool() { // !TBD get this from runner return true; } + private: + std::string m_name; + std::string m_description; }; } // end namespace Catch |