Commit Graph

5 Commits

Author SHA1 Message Date
Rafael Kitover 343eafc477
build: add variant-lite as nonstd::variant
From:

https://github.com/martinmoene/variant-lite

. Needed for macOS build.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-09-29 22:34:59 +00:00
Rafael Kitover 395ed0eb2a
build: fix tests build on Linux by doctest update
Update doctest.h because the old version causes build failures on Linux.

Also move it from third_party/include/doctest to third_party/include.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-09 14:18:40 +00:00
Rafael Kitover e29032d48a
Switch to nonstd::optional due to mac build issues
Switch usage of std::optional to nonstd::optional for now because of an
error from the Mac builder script, I cannot reproduce the problem yet
but will try to fix it later, it may not be fixable when targeting 10.7.

The header is from:

https://github.com/martinmoene/optional-lite
.

Usage is about the same, to include:

`#include "nonstd/optional.hpp"`

Then use nonstd::optional and nonstd::nullopt instead of the std::
counterparts.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2022-08-06 12:59:10 +00:00
Rafael Kitover a305f550e1
Replace Catch2 with doctest for unit tests.
Pretty much the same usage and functionality.

Add `tests.hpp` to configure doctest.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-08-28 05:14:22 +00:00
Rafael Kitover 81c88227fa Add Catch2 unit testing framework + some tests.
Add the Catch2 headers to third_party/include/catch2.

Add Catch.cmake and CatchAddTests.cmake to cmake/.

Add unit tests src/wx/tests/strutils.cpp using Catch2 to test
src/wx/strutils.cpp.

Make some code changes to strutils.cpp to make the tests pass.

See src/wx/tests/CMakeLists.txt for how to set up unit test files; they
plug into the normal CTest mechanism in cmake.

The test binaries are written to the tests/ subdirectory of the build
directory.

Building the tests and enabling the CTest support can be turned off by
passing -DBUILD_TESTING=OFF to cmake, the default is ON, this is the
standard mechanism.

Start running ctest on travis and appveyor.

Move stb to third_party/include where Catch2 is now as well.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
2020-07-10 13:43:48 +00:00