Skip to content

Commit

Permalink
Test: upate input_test.cpp (#3197)
Browse files Browse the repository at this point in the history
Co-authored-by: Zhao Tianqi <[email protected]>
  • Loading branch information
YuLiu98 and hongriTianqi authored Nov 13, 2023
1 parent 6a2a6ce commit 32b0e19
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions source/module_io/test/input_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1025,13 +1025,14 @@ TEST_F(InputTest, Check)
EXPECT_EXIT(INPUT.Check(), ::testing::ExitedWithCode(0), "");
output = testing::internal::GetCapturedStdout();
EXPECT_THAT(output, testing::HasSubstr("ecutrho/ecutwfc must >= 4"));

INPUT.ecutrho = 100.0;
INPUT.nx = INPUT.ny = INPUT.nz = 10;
INPUT.ndx = INPUT.ndy = INPUT.ndz = 8;
testing::internal::CaptureStdout();
INPUT.Check();
EXPECT_EXIT(INPUT.Check(), ::testing::ExitedWithCode(0), "");
output = testing::internal::GetCapturedStdout();
EXPECT_THAT(output, testing::HasSubstr("smooth grids is denser than dense grids"));
INPUT.ndx = INPUT.ndy = INPUT.ndz = 11;
//
INPUT.nbands = -1;
testing::internal::CaptureStdout();
Expand Down

0 comments on commit 32b0e19

Please sign in to comment.