Registry / testing / gtest
library1.17.0vcpkgunverified

Google Testing and Mocking Framework for C++.

vcpkg install gtest
INSTALL
IMPORT
SIG · GTEST
G
gtest
testingcppv1.17.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

gtest/gtest.h
#include <gtest/gtest.h>

Define and run a simple unit test.

#include <gtest/gtest.h> TEST(MyTest, Addition) { EXPECT_EQ(2 + 2, 4); } int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); return RUN_ALL_TESTS(); }
Debug
Known issues
gotchaGTest requires C++14 or later. Also, when using both gtest and gmock, link against GTest::gmock which includes gtest.
fix
Use target_link_libraries(your_test PRIVATE GTest::gtest GTest::gmock) and set C++ standard to at least 14.
affects: >=1.10.0
Upgrade
Version history
1.17.0latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
10
Resources

No resource links recorded.

gtest — pip install gtest · libregistry