Enable C++17, Catch2 unit testing
- Enables C11 and C++17 build support in cmake
Adds a .clang-format with some reasonable settings for C++ code (don't apply them to C files though)-
RedefinesYeah so it turns out C99/C11 _Bool is not necessarily compatible with C++ bool. Instead, the definition of boolean is changed up a bit and true/false are only defined in C compilation units, and we'll lean on conversion from C++ true/false to int32_t in C++ units.boolean
to the C11 bool type for compatibility with C++. Also, deprecates boolean; use bool instead - Adds Catch2 unit testing. Add test sources to the srb2tests target from subdirectories to add new unit tests.
-
Adds the very first C++ code into SRB2, theDeferred to a later MR; needs battle-testing on real code.srb2::Fixed
class, pseudo-numeric type designed to make arithmetic on fixed point values easy. Comes with its very own unit tests.
You can run the tests after building the srb2tests
target (builds by default) with the test
target.
Edited by Eidolon
Merge request reports
Activity
Filter activity
Please register or sign in to reply