mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-25 14:09:26 +00:00
Use CATCH_NULL instead of NULL
- expands to nullptr if CATCH_CONFIG_CPP11_NULLPTR is defined (see #444)
This commit is contained in:
parent
3b18d9e962
commit
805de43a3d
25 changed files with 112 additions and 101 deletions
|
@ -8,6 +8,8 @@
|
|||
#ifndef TWOBLUECUBES_CATCH_TEST_CASE_TRACKER_HPP_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_TEST_CASE_TRACKER_HPP_INCLUDED
|
||||
|
||||
#include "catch_compiler_capabilities.h"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <assert.h>
|
||||
|
@ -60,7 +62,7 @@ namespace SectionTracking {
|
|||
TrackedSections::iterator it = m_children.find( childName );
|
||||
return it != m_children.end()
|
||||
? &it->second
|
||||
: NULL;
|
||||
: CATCH_NULL;
|
||||
}
|
||||
inline TrackedSection* TrackedSection::acquireChild( std::string const& childName ) {
|
||||
if( TrackedSection* child = findChild( childName ) )
|
||||
|
@ -82,7 +84,7 @@ namespace SectionTracking {
|
|||
class TestCaseTracker {
|
||||
public:
|
||||
TestCaseTracker( std::string const& testCaseName )
|
||||
: m_testCase( testCaseName, NULL ),
|
||||
: m_testCase( testCaseName, CATCH_NULL ),
|
||||
m_currentSection( &m_testCase ),
|
||||
m_completedASectionThisRun( false )
|
||||
{}
|
||||
|
@ -99,7 +101,7 @@ namespace SectionTracking {
|
|||
void leaveSection() {
|
||||
m_currentSection->leave();
|
||||
m_currentSection = m_currentSection->getParent();
|
||||
assert( m_currentSection != NULL );
|
||||
assert( m_currentSection != CATCH_NULL );
|
||||
m_completedASectionThisRun = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue