Skip to content

Commit 39cfbd0

Browse files
committed
unittest: Replace NULL by nullptr
Signed-off-by: Stefan Weil <[email protected]>
1 parent 5eca914 commit 39cfbd0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

unittest/apiexample_test.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ namespace {
3232
class QuickTest : public testing::Test {
3333
protected:
3434
virtual void SetUp() {
35-
start_time_ = time(NULL);
35+
start_time_ = time(nullptr);
3636
}
3737
virtual void TearDown() {
38-
const time_t end_time = time(NULL);
38+
const time_t end_time = time(nullptr);
3939
EXPECT_TRUE(end_time - start_time_ <=25) << "The test took too long - " << ::testing::PrintToString(end_time - start_time_);
4040
}
4141
time_t start_time_;

unittest/unicharcompress_test.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class UnicharcompressTest : public ::testing::Test {
135135
RecodedCharID extended = code;
136136
int length = code.length();
137137
const GenericVector<int>* final_codes = compressed_.GetFinalCodes(code);
138-
if (final_codes != NULL) {
138+
if (final_codes != nullptr) {
139139
for (int i = 0; i < final_codes->size(); ++i) {
140140
int ending = (*final_codes)[i];
141141
EXPECT_GT(times_seen[ending](length), 0);
@@ -145,7 +145,7 @@ class UnicharcompressTest : public ::testing::Test {
145145
}
146146
}
147147
const GenericVector<int>* next_codes = compressed_.GetNextCodes(code);
148-
if (next_codes != NULL) {
148+
if (next_codes != nullptr) {
149149
for (int i = 0; i < next_codes->size(); ++i) {
150150
int extension = (*next_codes)[i];
151151
EXPECT_GT(times_seen[extension](length), 0);

0 commit comments

Comments
 (0)