1. Adds a `libdevilution_so` target when tests are enabled.
2. Each test file is now a separate binary target linked against `libdevilutionx_so` (can now run tests in parallel).
3. Tests are now defined in a separate `test/CMakeLists.txt` file.
4. Building the tests is now controlled by the standard `BUILD_TESTING` option (defined by CTest).
5. Tests are now built by default.
6. On CI, test errors are now reported.
Also:
* `.clang-format`: Enable SortIncludes in tests
* `path_test.cpp`: Fix -Wsign-compare
Only path_solid_pieces and FindPath are used outside the file, but the other functions are exposed in the header and have behaviour I felt worth testing individually.
* Refactor GetRotaryDistance to use Point instead of int x/y params
* Refactor HSExists to use Point instead of int x/y params
* Refactor IsPathBlocked to take typed params (Point, Direction)
The caller was already passing in a Direction value so this matches usage better. I also pulled the Direction to Point helper function up so it is available as a static class member, this allows replacing the use of the Offset array in plrctrls.cpp.
When adding a Direction to a point (and not scaling it first) I avoid explicitly creating a Point object since the operator+ overload will do that conversion implicitly.
* Replace Offsets array with Point::fromDirection
* Refactor GetDistanceRanged to use Point
I've added ExactDistance as a member function of Point to match ApproxDistance instead of only having it defined in GetDistanceRanged, it seemed more appropriate to be part of the class. Also removed temporary variables from callers of GetDistanceRanged as they were mainly used as a convenience for avoiding repetition when passing values into this function.
* Refactor GetDistance to use Point