Right now, the engine tests only function on \*nix-like systems (including MacOS). (Conversion to Windows will require, at the very least, looking at some of the file-handling code.) If you want to fix this, start by looking in Engine.cc in the test/src directory!
In addition to the engine requirements, you will need:
## Preparing to build
The Engine test suite now requires (at least) two additional pieces to run - **googletest** and **gtest-parallel**. You will note that I give specific instructions about where to put these, because that is what I have tried and tested. That does NOT mean other things won’t work; I simply haven’t tried them. So without further ado…
**googletest** is an XUnit testing framework we are now using in place of cpptest. Unlike a lot of other testing frameworks, it’s recommended that you compile and link the test code directly within your project. These instructions do with with **cmake**. If you can manage it with **bazel** instead, more power to you ;)
So. To get things started.
In the directory of your choice (default, if you don’t want to change **local.conf** - specifically **GTEST\_DIR** - is the test directory (this one, presumably)):
Engine tests now require libcpptest - if you have compilation failures using your distribution's lib (I'm looking at you, Ubuntu), please download the source at http://cpptest.sourceforge.net/, compile, and run.
New test creation requires python 3.x.
- TEST_ASSERT is a macro and does not always behave 100% the way you'd expect. Note the following:
* 1. If used in if/else blocks, make sure the blocks are guarded, or weird things happen.
* 2. If performing comparisons, please parenthesise liberally - bitwise operations being compared to 0 should always be parenthesised before comparison