/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2011,2012,2013,2014,2015,2016, by the GROMACS development team, led by
+ * Copyright (c) 2011,2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
* Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
* and including many others, as listed in the AUTHORS file in the
* top-level source directory and at http://www.gromacs.org.
{
GMX_RELEASE_ASSERT(initialized(),
"Accessing uninitialized reference data checker.");
- return compareRootEntry_ == NULL;
+ return compareRootEntry_ == nullptr;
}
//! Whether initialized with other means than the default constructor.
TestReferenceChecker::Impl::Impl(bool initialized)
: initialized_(initialized), defaultTolerance_(defaultRealTolerance()),
- compareRootEntry_(NULL), outputRootEntry_(NULL),
+ compareRootEntry_(nullptr), outputRootEntry_(nullptr),
updateMismatchingEntries_(false), bSelfTestMode_(false), seqIndex_(-1)
{
}
lastFoundEntry_ = entry;
return entry->get();
}
- return NULL;
+ return nullptr;
}
ReferenceDataEntry *
const IReferenceDataEntryChecker &checker)
{
ReferenceDataEntry *entry = findEntry(id);
- if (entry == NULL && outputRootEntry_ != NULL)
+ if (entry == nullptr && outputRootEntry_ != nullptr)
{
lastFoundEntry_ = compareRootEntry_->addChild(createEntry(type, id, checker));
entry = lastFoundEntry_->get();
}
std::string fullId = appendPath(id);
ReferenceDataEntry *entry = findOrCreateEntry(type, id, checker);
- if (entry == NULL)
+ if (entry == nullptr)
{
return ::testing::AssertionFailure()
<< "Reference data item " << fullId << " not found";
}
entry->setChecked();
::testing::AssertionResult result(checkEntry(*entry, fullId, type, checker));
- if (outputRootEntry_ != NULL && entry->correspondingOutputEntry() == NULL)
+ if (outputRootEntry_ != nullptr && entry->correspondingOutputEntry() == nullptr)
{
if (!updateMismatchingEntries_ || result)
{
bool TestReferenceChecker::checkPresent(bool bPresent, const char *id)
{
- if (impl_->shouldIgnore() || impl_->outputRootEntry_ != NULL)
+ if (impl_->shouldIgnore() || impl_->outputRootEntry_ != nullptr)
{
return bPresent;
}
std::string fullId = impl_->appendPath(id);
NullChecker checker;
ReferenceDataEntry *entry = impl_->findOrCreateEntry(type, id, checker);
- if (entry == NULL)
+ if (entry == nullptr)
{
ADD_FAILURE() << "Reference data item " << fullId << " not found";
return TestReferenceChecker(new Impl(true));
return TestReferenceChecker(new Impl(true));
}
}
- if (impl_->outputRootEntry_ != NULL && entry->correspondingOutputEntry() == NULL)
+ if (impl_->outputRootEntry_ != nullptr && entry->correspondingOutputEntry() == nullptr)
{
impl_->outputRootEntry_->addChild(entry->cloneToOutputEntry());
}