Unit Testing

Introdution

Unit testing can be used for testing small pieces of functionality. We use googletest as our test framework.

Running Tests

Googletest is already included in the OGS source code. Running tests is as simple as building the tests-target.

Writing Tests

All tests are located inside the Tests-directory in library-specific subfolders. To write a new test you simply create a new .cpp-file and use the googletest macros.


This article was written by Lars Bilke. If you are missing something or you find an error please let us know. Generated with Hugo 0.47.1. Last revision: February 26, 2018
Commit: [web] Finished testing section in devguide. 95f0f5912  | Edit this page on

Creative Commons License | Privacy policy / Legal statements / Impressum