Skip to content

Internals: Engine Unit Tests

Mahrud Sayrafi edited this page Aug 29, 2020 · 1 revision

Work in progress. Contributors: Michael Burr, Anton Leykin, (your-name-here)

Unit tests

The unit tests are fast tests that check easy things. These tests use the Google test suite. A new unit test can be created by going into the build directory e/unit-tests directory and writing a function with the command TEST(<Test suite name>,<specific test name>). Within these tests, use EXPECT_EQ(<Expected>,<function call>) to check the value. There are other tests, but this function should be enough for most purposes.

Run unit tests: Depending on the build method, there are different ways to run the tests depending on how M2 has been built.

  1. Using the configure approach, run "make check".

  2. Using the cmake approach, run "ctest -R unit"

Clone this wiki locally