simplify and apply clang-format

This commit is contained in:
Axel Kohlmeyer
2021-03-24 11:24:55 -04:00
parent b6a030532d
commit 487c55edf0
21 changed files with 983 additions and 1016 deletions

View File

@ -298,31 +298,31 @@ TEST_F(VariableTest, IfCommand)
command("if 1>0 then 'print \".*bingo!\"'");
auto text = ::testing::internal::GetCapturedStdout();
if (verbose) std::cout << text;
ASSERT_THAT(text,MatchesRegex(".*bingo!.*"));
ASSERT_THAT(text, MatchesRegex(".*bingo!.*"));
::testing::internal::CaptureStdout();
command("if (1>=0) then 'print \"bingo!\"'");
text = ::testing::internal::GetCapturedStdout();
if (verbose) std::cout << text;
ASSERT_THAT(text,MatchesRegex(".*bingo!.*"));
ASSERT_THAT(text, MatchesRegex(".*bingo!.*"));
::testing::internal::CaptureStdout();
command("if (-1.0e-1<0.0E+0) then 'print \"bingo!\"'");
text = ::testing::internal::GetCapturedStdout();
if (verbose) std::cout << text;
ASSERT_THAT(text,MatchesRegex(".*bingo!.*"));
ASSERT_THAT(text, MatchesRegex(".*bingo!.*"));
::testing::internal::CaptureStdout();
command("if (${one}==1.0)&&(2>=1) then 'print \"bingo!\"'");
text = ::testing::internal::GetCapturedStdout();
if (verbose) std::cout << text;
ASSERT_THAT(text,MatchesRegex(".*bingo!.*"));
ASSERT_THAT(text, MatchesRegex(".*bingo!.*"));
::testing::internal::CaptureStdout();
command("if !((${one}!=1.0)||(2|^1)) then 'print \"missed\"' else 'print \"bingo!\"'");
text = ::testing::internal::GetCapturedStdout();
if (verbose) std::cout << text;
ASSERT_THAT(text,MatchesRegex(".*bingo!.*"));
ASSERT_THAT(text, MatchesRegex(".*bingo!.*"));
TEST_FAILURE(".*ERROR: Invalid Boolean syntax in if command.*",
command("if () then 'print \"bingo!\"'"););