Skip to content

Commit

Permalink
fix test assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
el-carlitto committed Nov 8, 2022
1 parent d7bab86 commit 3f71e9b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ elseif(WITH_GOOGLE_TEST)
target_link_libraries(
gtest_version
GTest::gtest_main
helloworld
)

include(GoogleTest)
Expand Down
10 changes: 4 additions & 6 deletions googletest_version.cpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#include <gtest/gtest.h>

#include "lib.h"
// Demonstrate some basic assertions.
TEST(HelloTest, BasicAssertions) {
// Expect two strings not to be equal.
EXPECT_STRNE("hello", "world");
TEST(VersionTest, BasicAssertions) {
// Expect equality.
EXPECT_EQ(7 * 6, 42);
}
ASSERT_GT(version(), 0) << "wrong programm version";
}

0 comments on commit 3f71e9b

Please sign in to comment.