Skip to content

Commit

Permalink
unittest: Replace NULL by nullptr
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <sw@weilnetz.de>
  • Loading branch information
stweil committed Apr 22, 2018
1 parent 5eca914 commit 39cfbd0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions unittest/apiexample_test.cc
Expand Up @@ -32,10 +32,10 @@ namespace {
class QuickTest : public testing::Test {
protected:
virtual void SetUp() {
start_time_ = time(NULL);
start_time_ = time(nullptr);
}
virtual void TearDown() {
const time_t end_time = time(NULL);
const time_t end_time = time(nullptr);
EXPECT_TRUE(end_time - start_time_ <=25) << "The test took too long - " << ::testing::PrintToString(end_time - start_time_);
}
time_t start_time_;
Expand Down
4 changes: 2 additions & 2 deletions unittest/unicharcompress_test.cc
Expand Up @@ -135,7 +135,7 @@ class UnicharcompressTest : public ::testing::Test {
RecodedCharID extended = code;
int length = code.length();
const GenericVector<int>* final_codes = compressed_.GetFinalCodes(code);
if (final_codes != NULL) {
if (final_codes != nullptr) {
for (int i = 0; i < final_codes->size(); ++i) {
int ending = (*final_codes)[i];
EXPECT_GT(times_seen[ending](length), 0);
Expand All @@ -145,7 +145,7 @@ class UnicharcompressTest : public ::testing::Test {
}
}
const GenericVector<int>* next_codes = compressed_.GetNextCodes(code);
if (next_codes != NULL) {
if (next_codes != nullptr) {
for (int i = 0; i < next_codes->size(); ++i) {
int extension = (*next_codes)[i];
EXPECT_GT(times_seen[extension](length), 0);
Expand Down

0 comments on commit 39cfbd0

Please sign in to comment.