Skip to content

Commit

Permalink
Test Cpp formatting check
Browse files Browse the repository at this point in the history
  • Loading branch information
winswu committed Nov 1, 2024
1 parent 0ab7f25 commit 162f4e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions chapter_1/exercise_1_1/solution/lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

int exercise_1_1()
{
printf("hello, world\n");
printf("hello, world\n");

return 0;
return 0;
}
4 changes: 3 additions & 1 deletion chapter_1/exercise_1_1/test/test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ extern "C" {
}

TEST(Exercise_1_1, PrintfOutput) {
testing::internal::CaptureStdout();
testing::internal::CaptureStdout();

exercise_1_1();

std::string output = testing::internal::GetCapturedStdout();

EXPECT_EQ(output, "hello, world\n");


}

0 comments on commit 162f4e4

Please sign in to comment.