Skip to content

Commit

Permalink
correct unittest according to change on codes
Browse files Browse the repository at this point in the history
  • Loading branch information
kirk0830 committed May 24, 2024
1 parent d43e466 commit 936689d
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions source/module_base/test/timer_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ TEST_F(TimerTest, PrintAll)
EXPECT_THAT(output,testing::HasSubstr("TIME STATISTICS"));
EXPECT_THAT(output,testing::HasSubstr("CLASS_NAME"));
EXPECT_THAT(output,testing::HasSubstr("NAME"));
EXPECT_THAT(output,testing::HasSubstr("TIME(Sec)"));
EXPECT_THAT(output,testing::HasSubstr("TIME/s"));
EXPECT_THAT(output,testing::HasSubstr("CALLS"));
EXPECT_THAT(output,testing::HasSubstr("AVG(Sec)"));
EXPECT_THAT(output,testing::HasSubstr("PER(%)"));
EXPECT_THAT(output,testing::HasSubstr("AVG/s"));
EXPECT_THAT(output,testing::HasSubstr("PER/%"));
// check output in file
ifs.open("tmp");
std::cout << "Capture contents line by line from output file: \n" << std::endl;
Expand All @@ -131,10 +131,10 @@ TEST_F(TimerTest, PrintAll)
getline(ifs,output);
EXPECT_THAT(output,testing::HasSubstr("CLASS_NAME"));
EXPECT_THAT(output,testing::HasSubstr("NAME"));
EXPECT_THAT(output,testing::HasSubstr("TIME(Sec)"));
EXPECT_THAT(output,testing::HasSubstr("TIME/s"));
EXPECT_THAT(output,testing::HasSubstr("CALLS"));
EXPECT_THAT(output,testing::HasSubstr("AVG(Sec)"));
EXPECT_THAT(output,testing::HasSubstr("PER(%)"));
EXPECT_THAT(output,testing::HasSubstr("AVG/s"));
EXPECT_THAT(output,testing::HasSubstr("PER/%"));
ifs.close();
remove("time.json");
}
Expand Down Expand Up @@ -162,10 +162,10 @@ TEST_F(TimerTest, Finish)
EXPECT_THAT(output,testing::HasSubstr("TIME STATISTICS"));
EXPECT_THAT(output,testing::HasSubstr("CLASS_NAME"));
EXPECT_THAT(output,testing::HasSubstr("NAME"));
EXPECT_THAT(output,testing::HasSubstr("TIME(Sec)"));
EXPECT_THAT(output,testing::HasSubstr("TIME/s"));
EXPECT_THAT(output,testing::HasSubstr("CALLS"));
EXPECT_THAT(output,testing::HasSubstr("AVG(Sec)"));
EXPECT_THAT(output,testing::HasSubstr("PER(%)"));
EXPECT_THAT(output,testing::HasSubstr("AVG/s"));
EXPECT_THAT(output,testing::HasSubstr("PER/%"));
// check output in file
ifs.open("tmp");
std::cout << "Capture contents line by line from output file: \n" << std::endl;
Expand All @@ -175,10 +175,10 @@ TEST_F(TimerTest, Finish)
getline(ifs,output);
EXPECT_THAT(output,testing::HasSubstr("CLASS_NAME"));
EXPECT_THAT(output,testing::HasSubstr("NAME"));
EXPECT_THAT(output,testing::HasSubstr("TIME(Sec)"));
EXPECT_THAT(output,testing::HasSubstr("TIME/s"));
EXPECT_THAT(output,testing::HasSubstr("CALLS"));
EXPECT_THAT(output,testing::HasSubstr("AVG(Sec)"));
EXPECT_THAT(output,testing::HasSubstr("PER(%)"));
EXPECT_THAT(output,testing::HasSubstr("AVG/s"));
EXPECT_THAT(output,testing::HasSubstr("PER/%"));
ifs.close();
}

Expand Down

0 comments on commit 936689d

Please sign in to comment.