1*6777b538SAndroid Build Coastguard Worker# GoogleTest 2*6777b538SAndroid Build Coastguard Worker 3*6777b538SAndroid Build Coastguard Worker### Announcements 4*6777b538SAndroid Build Coastguard Worker 5*6777b538SAndroid Build Coastguard Worker#### Live at Head 6*6777b538SAndroid Build Coastguard Worker 7*6777b538SAndroid Build Coastguard WorkerGoogleTest now follows the 8*6777b538SAndroid Build Coastguard Worker[Abseil Live at Head philosophy](https://abseil.io/about/philosophy#upgrade-support). 9*6777b538SAndroid Build Coastguard WorkerWe recommend 10*6777b538SAndroid Build Coastguard Worker[updating to the latest commit in the `main` branch as often as possible](https://github.com/abseil/abseil-cpp/blob/master/FAQ.md#what-is-live-at-head-and-how-do-i-do-it). 11*6777b538SAndroid Build Coastguard WorkerWe do publish occasional semantic versions, tagged with 12*6777b538SAndroid Build Coastguard Worker`v${major}.${minor}.${patch}` (e.g. `v1.14.0`). 13*6777b538SAndroid Build Coastguard Worker 14*6777b538SAndroid Build Coastguard Worker#### Documentation Updates 15*6777b538SAndroid Build Coastguard Worker 16*6777b538SAndroid Build Coastguard WorkerOur documentation is now live on GitHub Pages at 17*6777b538SAndroid Build Coastguard Workerhttps://google.github.io/googletest/. We recommend browsing the documentation on 18*6777b538SAndroid Build Coastguard WorkerGitHub Pages rather than directly in the repository. 19*6777b538SAndroid Build Coastguard Worker 20*6777b538SAndroid Build Coastguard Worker#### Release 1.14.0 21*6777b538SAndroid Build Coastguard Worker 22*6777b538SAndroid Build Coastguard Worker[Release 1.14.0](https://github.com/google/googletest/releases/tag/v1.14.0) is 23*6777b538SAndroid Build Coastguard Workernow available. 24*6777b538SAndroid Build Coastguard Worker 25*6777b538SAndroid Build Coastguard WorkerThe 1.14.x branch requires at least C++14. 26*6777b538SAndroid Build Coastguard Worker 27*6777b538SAndroid Build Coastguard Worker#### Continuous Integration 28*6777b538SAndroid Build Coastguard Worker 29*6777b538SAndroid Build Coastguard WorkerWe use Google's internal systems for continuous integration. \ 30*6777b538SAndroid Build Coastguard WorkerGitHub Actions were added for the convenience of open-source contributors. They 31*6777b538SAndroid Build Coastguard Workerare exclusively maintained by the open-source community and not used by the 32*6777b538SAndroid Build Coastguard WorkerGoogleTest team. 33*6777b538SAndroid Build Coastguard Worker 34*6777b538SAndroid Build Coastguard Worker#### Coming Soon 35*6777b538SAndroid Build Coastguard Worker 36*6777b538SAndroid Build Coastguard Worker* We are planning to take a dependency on 37*6777b538SAndroid Build Coastguard Worker [Abseil](https://github.com/abseil/abseil-cpp). 38*6777b538SAndroid Build Coastguard Worker* More documentation improvements are planned. 39*6777b538SAndroid Build Coastguard Worker 40*6777b538SAndroid Build Coastguard Worker## Welcome to **GoogleTest**, Google's C++ test framework! 41*6777b538SAndroid Build Coastguard Worker 42*6777b538SAndroid Build Coastguard WorkerThis repository is a merger of the formerly separate GoogleTest and GoogleMock 43*6777b538SAndroid Build Coastguard Workerprojects. These were so closely related that it makes sense to maintain and 44*6777b538SAndroid Build Coastguard Workerrelease them together. 45*6777b538SAndroid Build Coastguard Worker 46*6777b538SAndroid Build Coastguard Worker### Getting Started 47*6777b538SAndroid Build Coastguard Worker 48*6777b538SAndroid Build Coastguard WorkerSee the [GoogleTest User's Guide](https://google.github.io/googletest/) for 49*6777b538SAndroid Build Coastguard Workerdocumentation. We recommend starting with the 50*6777b538SAndroid Build Coastguard Worker[GoogleTest Primer](https://google.github.io/googletest/primer.html). 51*6777b538SAndroid Build Coastguard Worker 52*6777b538SAndroid Build Coastguard WorkerMore information about building GoogleTest can be found at 53*6777b538SAndroid Build Coastguard Worker[googletest/README.md](googletest/README.md). 54*6777b538SAndroid Build Coastguard Worker 55*6777b538SAndroid Build Coastguard Worker## Features 56*6777b538SAndroid Build Coastguard Worker 57*6777b538SAndroid Build Coastguard Worker* xUnit test framework: \ 58*6777b538SAndroid Build Coastguard Worker Googletest is based on the [xUnit](https://en.wikipedia.org/wiki/XUnit) 59*6777b538SAndroid Build Coastguard Worker testing framework, a popular architecture for unit testing 60*6777b538SAndroid Build Coastguard Worker* Test discovery: \ 61*6777b538SAndroid Build Coastguard Worker Googletest automatically discovers and runs your tests, eliminating the need 62*6777b538SAndroid Build Coastguard Worker to manually register your tests 63*6777b538SAndroid Build Coastguard Worker* Rich set of assertions: \ 64*6777b538SAndroid Build Coastguard Worker Googletest provides a variety of assertions, such as equality, inequality, 65*6777b538SAndroid Build Coastguard Worker exceptions, and more, making it easy to test your code 66*6777b538SAndroid Build Coastguard Worker* User-defined assertions: \ 67*6777b538SAndroid Build Coastguard Worker You can define your own assertions with Googletest, making it simple to 68*6777b538SAndroid Build Coastguard Worker write tests that are specific to your code 69*6777b538SAndroid Build Coastguard Worker* Death tests: \ 70*6777b538SAndroid Build Coastguard Worker Googletest supports death tests, which verify that your code exits in a 71*6777b538SAndroid Build Coastguard Worker certain way, making it useful for testing error-handling code 72*6777b538SAndroid Build Coastguard Worker* Fatal and non-fatal failures: \ 73*6777b538SAndroid Build Coastguard Worker You can specify whether a test failure should be treated as fatal or 74*6777b538SAndroid Build Coastguard Worker non-fatal with Googletest, allowing tests to continue running even if a 75*6777b538SAndroid Build Coastguard Worker failure occurs 76*6777b538SAndroid Build Coastguard Worker* Value-parameterized tests: \ 77*6777b538SAndroid Build Coastguard Worker Googletest supports value-parameterized tests, which run multiple times with 78*6777b538SAndroid Build Coastguard Worker different input values, making it useful for testing functions that take 79*6777b538SAndroid Build Coastguard Worker different inputs 80*6777b538SAndroid Build Coastguard Worker* Type-parameterized tests: \ 81*6777b538SAndroid Build Coastguard Worker Googletest also supports type-parameterized tests, which run with different 82*6777b538SAndroid Build Coastguard Worker data types, making it useful for testing functions that work with different 83*6777b538SAndroid Build Coastguard Worker data types 84*6777b538SAndroid Build Coastguard Worker* Various options for running tests: \ 85*6777b538SAndroid Build Coastguard Worker Googletest provides many options for running tests including running 86*6777b538SAndroid Build Coastguard Worker individual tests, running tests in a specific order and running tests in 87*6777b538SAndroid Build Coastguard Worker parallel 88*6777b538SAndroid Build Coastguard Worker 89*6777b538SAndroid Build Coastguard Worker## Supported Platforms 90*6777b538SAndroid Build Coastguard Worker 91*6777b538SAndroid Build Coastguard WorkerGoogleTest follows Google's 92*6777b538SAndroid Build Coastguard Worker[Foundational C++ Support Policy](https://opensource.google/documentation/policies/cplusplus-support). 93*6777b538SAndroid Build Coastguard WorkerSee 94*6777b538SAndroid Build Coastguard Worker[this table](https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md) 95*6777b538SAndroid Build Coastguard Workerfor a list of currently supported versions of compilers, platforms, and build 96*6777b538SAndroid Build Coastguard Workertools. 97*6777b538SAndroid Build Coastguard Worker 98*6777b538SAndroid Build Coastguard Worker## Who Is Using GoogleTest? 99*6777b538SAndroid Build Coastguard Worker 100*6777b538SAndroid Build Coastguard WorkerIn addition to many internal projects at Google, GoogleTest is also used by the 101*6777b538SAndroid Build Coastguard Workerfollowing notable projects: 102*6777b538SAndroid Build Coastguard Worker 103*6777b538SAndroid Build Coastguard Worker* The [Chromium projects](https://www.chromium.org/) (behind the Chrome 104*6777b538SAndroid Build Coastguard Worker browser and Chrome OS). 105*6777b538SAndroid Build Coastguard Worker* The [LLVM](https://llvm.org/) compiler. 106*6777b538SAndroid Build Coastguard Worker* [Protocol Buffers](https://github.com/google/protobuf), Google's data 107*6777b538SAndroid Build Coastguard Worker interchange format. 108*6777b538SAndroid Build Coastguard Worker* The [OpenCV](https://opencv.org/) computer vision library. 109*6777b538SAndroid Build Coastguard Worker 110*6777b538SAndroid Build Coastguard Worker## Related Open Source Projects 111*6777b538SAndroid Build Coastguard Worker 112*6777b538SAndroid Build Coastguard Worker[GTest Runner](https://github.com/nholthaus/gtest-runner) is a Qt5 based 113*6777b538SAndroid Build Coastguard Workerautomated test-runner and Graphical User Interface with powerful features for 114*6777b538SAndroid Build Coastguard WorkerWindows and Linux platforms. 115*6777b538SAndroid Build Coastguard Worker 116*6777b538SAndroid Build Coastguard Worker[GoogleTest UI](https://github.com/ospector/gtest-gbar) is a test runner that 117*6777b538SAndroid Build Coastguard Workerruns your test binary, allows you to track its progress via a progress bar, and 118*6777b538SAndroid Build Coastguard Workerdisplays a list of test failures. Clicking on one shows failure text. GoogleTest 119*6777b538SAndroid Build Coastguard WorkerUI is written in C#. 120*6777b538SAndroid Build Coastguard Worker 121*6777b538SAndroid Build Coastguard Worker[GTest TAP Listener](https://github.com/kinow/gtest-tap-listener) is an event 122*6777b538SAndroid Build Coastguard Workerlistener for GoogleTest that implements the 123*6777b538SAndroid Build Coastguard Worker[TAP protocol](https://en.wikipedia.org/wiki/Test_Anything_Protocol) for test 124*6777b538SAndroid Build Coastguard Workerresult output. If your test runner understands TAP, you may find it useful. 125*6777b538SAndroid Build Coastguard Worker 126*6777b538SAndroid Build Coastguard Worker[gtest-parallel](https://github.com/google/gtest-parallel) is a test runner that 127*6777b538SAndroid Build Coastguard Workerruns tests from your binary in parallel to provide significant speed-up. 128*6777b538SAndroid Build Coastguard Worker 129*6777b538SAndroid Build Coastguard Worker[GoogleTest Adapter](https://marketplace.visualstudio.com/items?itemName=DavidSchuldenfrei.gtest-adapter) 130*6777b538SAndroid Build Coastguard Workeris a VS Code extension allowing to view GoogleTest in a tree view and run/debug 131*6777b538SAndroid Build Coastguard Workeryour tests. 132*6777b538SAndroid Build Coastguard Worker 133*6777b538SAndroid Build Coastguard Worker[C++ TestMate](https://github.com/matepek/vscode-catch2-test-adapter) is a VS 134*6777b538SAndroid Build Coastguard WorkerCode extension allowing to view GoogleTest in a tree view and run/debug your 135*6777b538SAndroid Build Coastguard Workertests. 136*6777b538SAndroid Build Coastguard Worker 137*6777b538SAndroid Build Coastguard Worker[Cornichon](https://pypi.org/project/cornichon/) is a small Gherkin DSL parser 138*6777b538SAndroid Build Coastguard Workerthat generates stub code for GoogleTest. 139*6777b538SAndroid Build Coastguard Worker 140*6777b538SAndroid Build Coastguard Worker## Contributing Changes 141*6777b538SAndroid Build Coastguard Worker 142*6777b538SAndroid Build Coastguard WorkerPlease read 143*6777b538SAndroid Build Coastguard Worker[`CONTRIBUTING.md`](https://github.com/google/googletest/blob/main/CONTRIBUTING.md) 144*6777b538SAndroid Build Coastguard Workerfor details on how to contribute to this project. 145*6777b538SAndroid Build Coastguard Worker 146*6777b538SAndroid Build Coastguard WorkerHappy testing! 147