diff --git a/apps/OpenSpace/ext/sgct b/apps/OpenSpace/ext/sgct index 704742c4c1..65ba2fd03b 160000 --- a/apps/OpenSpace/ext/sgct +++ b/apps/OpenSpace/ext/sgct @@ -1 +1 @@ -Subproject commit 704742c4c10254fa5d8415b1aab6e0b673aa1ab6 +Subproject commit 65ba2fd03b48b337aeaff1443eeda65a51a1dcf6 diff --git a/ext/ghoul b/ext/ghoul index e11e97d203..21115932ce 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit e11e97d203c5f37cc1f4c6dc59146a46a7d58976 +Subproject commit 21115932cebd960d289f75a463c21aacee4041e5 diff --git a/support/coding/codegen b/support/coding/codegen index be55036b25..107f662bff 160000 --- a/support/coding/codegen +++ b/support/coding/codegen @@ -1 +1 @@ -Subproject commit be55036b25c537b3c2e306465d450e6df6625df3 +Subproject commit 107f662bffb90aca6fcc4e97e34834352838ec94 diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6361a26c61..06c09091a0 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -53,13 +53,8 @@ add_executable( set_openspace_compile_settings(OpenSpaceTest) -target_include_directories(OpenSpaceTest - PUBLIC - "${GHOUL_BASE_DIR}/ext/catch2/single_include" - "${OPENSPACE_BASE_DIR}" -) target_compile_definitions(OpenSpaceTest PUBLIC "GHL_THROW_ON_ASSERT") -target_link_libraries(OpenSpaceTest PUBLIC openspace-core) +target_link_libraries(OpenSpaceTest PUBLIC Catch2 openspace-core) foreach (library_name ${all_enabled_modules}) get_target_property(library_type ${library_name} TYPE) diff --git a/tests/main.cpp b/tests/main.cpp index 844cead108..0da1022ff9 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -22,8 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#define CATCH_CONFIG_RUNNER -#include "catch2/catch.hpp" +#include #include #include diff --git a/tests/property/test_property_listproperties.cpp b/tests/property/test_property_listproperties.cpp index 19d55f8997..d2eb8d680e 100644 --- a/tests/property/test_property_listproperties.cpp +++ b/tests/property/test_property_listproperties.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include #include #include diff --git a/tests/property/test_property_optionproperty.cpp b/tests/property/test_property_optionproperty.cpp index 19b469d5fd..bf4dfb8245 100644 --- a/tests/property/test_property_optionproperty.cpp +++ b/tests/property/test_property_optionproperty.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include #include diff --git a/tests/property/test_property_selectionproperty.cpp b/tests/property/test_property_selectionproperty.cpp index 96e882896e..4e0e22a35d 100644 --- a/tests/property/test_property_selectionproperty.cpp +++ b/tests/property/test_property_selectionproperty.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include #include #include diff --git a/tests/regression/517.cpp b/tests/regression/517.cpp index 8a2ca7be12..7cb2cd189b 100644 --- a/tests/regression/517.cpp +++ b/tests/regression/517.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include #include diff --git a/tests/test_assetloader.cpp b/tests/test_assetloader.cpp index 845b8fced4..a3a783418d 100644 --- a/tests/test_assetloader.cpp +++ b/tests/test_assetloader.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include #include #include diff --git a/tests/test_concurrentqueue.cpp b/tests/test_concurrentqueue.cpp index 4b85000f2a..a8cbd1fcf0 100644 --- a/tests/test_concurrentqueue.cpp +++ b/tests/test_concurrentqueue.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include #include diff --git a/tests/test_configuration.cpp b/tests/test_configuration.cpp index dfb198778f..01cd0b8839 100644 --- a/tests/test_configuration.cpp +++ b/tests/test_configuration.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include #include #include diff --git a/tests/test_distanceconversion.cpp b/tests/test_distanceconversion.cpp index ef38e7c824..98fe07da54 100644 --- a/tests/test_distanceconversion.cpp +++ b/tests/test_distanceconversion.cpp @@ -22,7 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include +#include #include #include @@ -34,76 +35,76 @@ TEST_CASE("DistanceConversion: Convert to meters", "[distanceconversion]") { double res; res = convertDistance(unit, DistanceUnit::Nanometer, DistanceUnit::Meter); - CHECK(res == Approx(1e-9)); + CHECK(res == Catch::Approx(1e-9)); res = convertDistance(unit, DistanceUnit::Micrometer, DistanceUnit::Meter); - CHECK(res == Approx(1e-6)); + CHECK(res == Catch::Approx(1e-6)); res = convertDistance(unit, DistanceUnit::Millimeter, DistanceUnit::Meter); - CHECK(res == Approx(1e-3)); + CHECK(res == Catch::Approx(1e-3)); res = convertDistance(unit, DistanceUnit::Centimeter, DistanceUnit::Meter); - CHECK(res == Approx(1e-2)); + CHECK(res == Catch::Approx(1e-2)); res = convertDistance(unit, DistanceUnit::Decimeter, DistanceUnit::Meter); - CHECK(res == Approx(1e-1)); + CHECK(res == Catch::Approx(1e-1)); res = convertDistance(unit, DistanceUnit::Meter, DistanceUnit::Meter); - CHECK(res == Approx(1.0)); + CHECK(res == Catch::Approx(1.0)); res = convertDistance(unit, DistanceUnit::Kilometer, DistanceUnit::Meter); - CHECK(res == Approx(1000.0)); + CHECK(res == Catch::Approx(1000.0)); res = convertDistance(unit, DistanceUnit::AU, DistanceUnit::Meter); - CHECK(res == Approx(1.495978707E11)); + CHECK(res == Catch::Approx(1.495978707E11)); res = convertDistance(unit, DistanceUnit::Lighthour, DistanceUnit::Meter); - CHECK(res == Approx(1.0799921E12)); + CHECK(res == Catch::Approx(1.0799921E12)); res = convertDistance(unit, DistanceUnit::Lightday, DistanceUnit::Meter); - CHECK(res == Approx(2.591981E13)); + CHECK(res == Catch::Approx(2.591981E13)); res = convertDistance(unit, DistanceUnit::Lightmonth, DistanceUnit::Meter); - CHECK(res == Approx(7.8839421E14)); + CHECK(res == Catch::Approx(7.8839421E14)); res = convertDistance(unit, DistanceUnit::Lightyear, DistanceUnit::Meter); - CHECK(res == Approx(9.4607304725808E15)); + CHECK(res == Catch::Approx(9.4607304725808E15)); res = convertDistance(unit, DistanceUnit::Parsec, DistanceUnit::Meter); - CHECK(res == Approx(3.0856776E16)); + CHECK(res == Catch::Approx(3.0856776E16)); res = convertDistance(unit, DistanceUnit::Kiloparsec, DistanceUnit::Meter); - CHECK(res == Approx(1e3 * 3.0856776E16)); + CHECK(res == Catch::Approx(1e3 * 3.0856776E16)); res = convertDistance(unit, DistanceUnit::Megaparsec, DistanceUnit::Meter); - CHECK(res == Approx(1e6 * 3.0856776E16)); + CHECK(res == Catch::Approx(1e6 * 3.0856776E16)); res = convertDistance(unit, DistanceUnit::Gigaparsec, DistanceUnit::Meter); - CHECK(res == Approx(1e9 * 3.0856776E16)); + CHECK(res == Catch::Approx(1e9 * 3.0856776E16)); res = convertDistance(unit, DistanceUnit::Thou, DistanceUnit::Meter); - CHECK(res == Approx(1e-3 * 0.0254)); + CHECK(res == Catch::Approx(1e-3 * 0.0254)); res = convertDistance(unit, DistanceUnit::Inch, DistanceUnit::Meter); - CHECK(res == Approx(0.0254)); + CHECK(res == Catch::Approx(0.0254)); res = convertDistance(unit, DistanceUnit::Foot, DistanceUnit::Meter); - CHECK(res == Approx(0.3048)); + CHECK(res == Catch::Approx(0.3048)); res = convertDistance(unit, DistanceUnit::Yard, DistanceUnit::Meter); - CHECK(res == Approx(0.9144)); + CHECK(res == Catch::Approx(0.9144)); res = convertDistance(unit, DistanceUnit::Chain, DistanceUnit::Meter); - CHECK(res == Approx(20.1168)); + CHECK(res == Catch::Approx(20.1168)); res = convertDistance(unit, DistanceUnit::Furlong, DistanceUnit::Meter); - CHECK(res == Approx(10.0 * 20.1168)); + CHECK(res == Catch::Approx(10.0 * 20.1168)); res = convertDistance(unit, DistanceUnit::Mile, DistanceUnit::Meter); - CHECK(res == Approx(1609.344)); + CHECK(res == Catch::Approx(1609.344)); res = convertDistance(unit, DistanceUnit::League, DistanceUnit::Meter); - CHECK(res == Approx(3.0 * 1609.344)); + CHECK(res == Catch::Approx(3.0 * 1609.344)); } TEST_CASE("DistanceConversion: Convert from meters", "[distanceconversion]") { @@ -111,76 +112,76 @@ TEST_CASE("DistanceConversion: Convert from meters", "[distanceconversion]") { double res; res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Nanometer); - CHECK(res == Approx(meters / 1e-9)); + CHECK(res == Catch::Approx(meters / 1e-9)); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Micrometer); - CHECK(res == Approx(meters / 1e-6)); + CHECK(res == Catch::Approx(meters / 1e-6)); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Millimeter); - CHECK(res == Approx(meters / 1e-3)); + CHECK(res == Catch::Approx(meters / 1e-3)); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Centimeter); - CHECK(res == Approx(meters / 1e-2)); + CHECK(res == Catch::Approx(meters / 1e-2)); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Decimeter); - CHECK(res == Approx(meters / 1e-1)); + CHECK(res == Catch::Approx(meters / 1e-1)); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Meter); - CHECK(res == Approx(1.0)); + CHECK(res == Catch::Approx(1.0)); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Kilometer); - CHECK(res == Approx(meters / 1000.0)); + CHECK(res == Catch::Approx(meters / 1000.0)); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::AU); - CHECK(res == Approx(meters / 1.495978707E11)); + CHECK(res == Catch::Approx(meters / 1.495978707E11)); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Lighthour); - CHECK(res == Approx(meters / 1.0799921E12)); + CHECK(res == Catch::Approx(meters / 1.0799921E12)); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Lightday); - CHECK(res == Approx(meters / 2.591981E13)); + CHECK(res == Catch::Approx(meters / 2.591981E13)); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Lightmonth); - CHECK(res == Approx(meters / 7.8839421E14)); + CHECK(res == Catch::Approx(meters / 7.8839421E14)); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Lightyear); - CHECK(res == Approx(meters / 9.4607304725808E15)); + CHECK(res == Catch::Approx(meters / 9.4607304725808E15)); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Parsec); - CHECK(res == Approx(meters / 3.0856776E16)); + CHECK(res == Catch::Approx(meters / 3.0856776E16)); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Kiloparsec); - CHECK(res == Approx(meters / (1e3 * 3.0856776E16))); + CHECK(res == Catch::Approx(meters / (1e3 * 3.0856776E16))); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Megaparsec); - CHECK(res == Approx(meters / (1e6 * 3.0856776E16))); + CHECK(res == Catch::Approx(meters / (1e6 * 3.0856776E16))); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Gigaparsec); - CHECK(res == Approx(meters / (1e9 * 3.0856776E16))); + CHECK(res == Catch::Approx(meters / (1e9 * 3.0856776E16))); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Thou); - CHECK(res == Approx(meters / (1e-3 * 0.0254))); + CHECK(res == Catch::Approx(meters / (1e-3 * 0.0254))); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Inch); - CHECK(res == Approx(meters / 0.0254)); + CHECK(res == Catch::Approx(meters / 0.0254)); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Foot); - CHECK(res == Approx(meters / 0.3048)); + CHECK(res == Catch::Approx(meters / 0.3048)); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Yard); - CHECK(res == Approx(meters / 0.9144)); + CHECK(res == Catch::Approx(meters / 0.9144)); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Chain); - CHECK(res == Approx(meters / 20.1168)); + CHECK(res == Catch::Approx(meters / 20.1168)); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Furlong); - CHECK(res == Approx(meters / (10.0 * 20.1168))); + CHECK(res == Catch::Approx(meters / (10.0 * 20.1168))); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::Mile); - CHECK(res == Approx(meters / 1609.344)); + CHECK(res == Catch::Approx(meters / 1609.344)); res = convertDistance(meters, DistanceUnit::Meter, DistanceUnit::League); - CHECK(res == Approx(meters / (3.0 * 1609.344))); + CHECK(res == Catch::Approx(meters / (3.0 * 1609.344))); } TEST_CASE("DistanceConversion: Cross conversion", "[distanceconversion]") { @@ -188,71 +189,71 @@ TEST_CASE("DistanceConversion: Cross conversion", "[distanceconversion]") { double res; res = convertDistance(unit, DistanceUnit::Nanometer, DistanceUnit::Kilometer); - CHECK(res == Approx(1e-12)); + CHECK(res == Catch::Approx(1e-12)); res = convertDistance(unit, DistanceUnit::Micrometer, DistanceUnit::Decimeter); - CHECK(res == Approx(1e-5)); + CHECK(res == Catch::Approx(1e-5)); res = convertDistance(unit, DistanceUnit::Millimeter, DistanceUnit::Nanometer); - CHECK(res == Approx(1e6)); + CHECK(res == Catch::Approx(1e6)); res = convertDistance(unit, DistanceUnit::Centimeter, DistanceUnit::Micrometer); - CHECK(res == Approx(1e4)); + CHECK(res == Catch::Approx(1e4)); res = convertDistance(unit, DistanceUnit::Decimeter, DistanceUnit::Millimeter); - CHECK(res == Approx(1e2)); + CHECK(res == Catch::Approx(1e2)); res = convertDistance(unit, DistanceUnit::Kilometer, DistanceUnit::Centimeter); - CHECK(res == Approx(1e5)); + CHECK(res == Catch::Approx(1e5)); res = convertDistance(unit, DistanceUnit::AU, DistanceUnit::Parsec); - CHECK(res == Approx(4.84813681e-6)); + CHECK(res == Catch::Approx(4.84813681e-6)); res = convertDistance(unit, DistanceUnit::Lighthour, DistanceUnit::Lightmonth); - CHECK(res == Approx(1.36986305e-3)); + CHECK(res == Catch::Approx(1.36986305e-3)); res = convertDistance(unit, DistanceUnit::Lightday, DistanceUnit::Kiloparsec); - CHECK(res == Approx(8.40003829e-7)); + CHECK(res == Catch::Approx(8.40003829e-7)); res = convertDistance(unit, DistanceUnit::Lightmonth, DistanceUnit::Lightday); - CHECK(res == Approx(30.4166662487)); + CHECK(res == Catch::Approx(30.4166662487)); res = convertDistance(unit, DistanceUnit::Lightyear, DistanceUnit::Gigaparsec); - CHECK(res == Approx(3.0660139e-10)); + CHECK(res == Catch::Approx(3.0660139e-10)); res = convertDistance(unit, DistanceUnit::Parsec, DistanceUnit::Lightyear); - CHECK(res == Approx(3.26156379673)); + CHECK(res == Catch::Approx(3.26156379673)); res = convertDistance(unit, DistanceUnit::Kiloparsec, DistanceUnit::AU); - CHECK(res == Approx(2.06264806E8)); + CHECK(res == Catch::Approx(2.06264806E8)); res = convertDistance(unit, DistanceUnit::Megaparsec, DistanceUnit::Lighthour); - CHECK(res == Approx(2.85712978826E10)); + CHECK(res == Catch::Approx(2.85712978826E10)); res = convertDistance(unit, DistanceUnit::Gigaparsec, DistanceUnit::Megaparsec); - CHECK(res == Approx(1e3)); + CHECK(res == Catch::Approx(1e3)); res = convertDistance(unit, DistanceUnit::Thou, DistanceUnit::Yard); - CHECK(res == Approx(2.77777778e-5)); + CHECK(res == Catch::Approx(2.77777778e-5)); res = convertDistance(unit, DistanceUnit::Inch, DistanceUnit::Foot); - CHECK(res == Approx(8.33333333e-2)); + CHECK(res == Catch::Approx(8.33333333e-2)); res = convertDistance(unit, DistanceUnit::Foot, DistanceUnit::Mile); - CHECK(res == Approx(1.89393939e-4)); + CHECK(res == Catch::Approx(1.89393939e-4)); res = convertDistance(unit, DistanceUnit::Yard, DistanceUnit::Chain); - CHECK(res == Approx(4.54545455e-2)); + CHECK(res == Catch::Approx(4.54545455e-2)); res = convertDistance(unit, DistanceUnit::Chain, DistanceUnit::League); - CHECK(res == Approx(4.16666666e-3)); + CHECK(res == Catch::Approx(4.16666666e-3)); res = convertDistance(unit, DistanceUnit::Furlong, DistanceUnit::Thou); - CHECK(res == Approx(7.92E6)); + CHECK(res == Catch::Approx(7.92E6)); res = convertDistance(unit, DistanceUnit::Mile, DistanceUnit::Inch); - CHECK(res == Approx(6.3360E4)); + CHECK(res == Catch::Approx(6.3360E4)); res = convertDistance(unit, DistanceUnit::League, DistanceUnit::Furlong); - CHECK(res == Approx(24.0)); + CHECK(res == Catch::Approx(24.0)); } diff --git a/tests/test_documentation.cpp b/tests/test_documentation.cpp index b012fc5603..66702f9789 100644 --- a/tests/test_documentation.cpp +++ b/tests/test_documentation.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include #include #include diff --git a/tests/test_horizons.cpp b/tests/test_horizons.cpp index c5a70ee113..2d97b5ed3b 100644 --- a/tests/test_horizons.cpp +++ b/tests/test_horizons.cpp @@ -22,7 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include +#include #include #include @@ -123,22 +124,22 @@ void testReadingHorizons(HorizonsType type, std::filesystem::path filePath, std::vector data = result.data; REQUIRE(data.size() == 3); - CHECK(data[0].time == Approx(t0)); - CHECK(data[0].position.x == Approx(x0)); - CHECK(data[0].position.y == Approx(y0)); - CHECK(data[0].position.z == Approx(z0)); + CHECK(data[0].time == Catch::Approx(t0)); + CHECK(data[0].position.x == Catch::Approx(x0)); + CHECK(data[0].position.y == Catch::Approx(y0)); + CHECK(data[0].position.z == Catch::Approx(z0)); - CHECK(data[1].time == Approx(t1)); - CHECK(data[1].position.x == Approx(x1)); - CHECK(data[1].position.y == Approx(y1)); - CHECK(data[1].position.z == Approx(z1)); + CHECK(data[1].time == Catch::Approx(t1)); + CHECK(data[1].position.x == Catch::Approx(x1)); + CHECK(data[1].position.y == Catch::Approx(y1)); + CHECK(data[1].position.z == Catch::Approx(z1)); - CHECK(data[2].time == Approx(t2)); - CHECK(data[2].position.x == Approx(x2)); - CHECK(data[2].position.y == Approx(y2)); - CHECK(data[2].position.z == Approx(z2)); + CHECK(data[2].time == Catch::Approx(t2)); + CHECK(data[2].position.x == Catch::Approx(x2)); + CHECK(data[2].position.y == Catch::Approx(y2)); + CHECK(data[2].position.z == Catch::Approx(z2)); // Clean up openspace::SpiceManager::ref().unloadKernel(kernel.string()); diff --git a/tests/test_iswamanager.cpp b/tests/test_iswamanager.cpp index cec926f432..f6a5dbb97a 100644 --- a/tests/test_iswamanager.cpp +++ b/tests/test_iswamanager.cpp @@ -24,7 +24,7 @@ #ifdef OPENSPACE_MODULE_ISWA_ENABLED -#include "catch2/catch.hpp" +#include #include #include diff --git a/tests/test_jsonformatting.cpp b/tests/test_jsonformatting.cpp index 3caca0b87a..cd3d97b28d 100644 --- a/tests/test_jsonformatting.cpp +++ b/tests/test_jsonformatting.cpp @@ -22,7 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include +#include #include #include diff --git a/tests/test_latlonpatch.cpp b/tests/test_latlonpatch.cpp index 185585d4ee..6b95778f35 100644 --- a/tests/test_latlonpatch.cpp +++ b/tests/test_latlonpatch.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include #include #include diff --git a/tests/test_lrucache.cpp b/tests/test_lrucache.cpp index 235444c587..05355ea0fb 100644 --- a/tests/test_lrucache.cpp +++ b/tests/test_lrucache.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include #include #include diff --git a/tests/test_lua_createsinglecolorimage.cpp b/tests/test_lua_createsinglecolorimage.cpp index ed4b943dc0..1f65021d13 100644 --- a/tests/test_lua_createsinglecolorimage.cpp +++ b/tests/test_lua_createsinglecolorimage.cpp @@ -22,7 +22,9 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include +#include +#include #include #include @@ -42,7 +44,7 @@ TEST_CASE("CreateSingleColorImage: Create image and check return value", CHECK_THAT( path.string(), - Catch::Matchers::Contains("colorFile.ppm") + Catch::Matchers::ContainsSubstring("colorFile.ppm") ); } @@ -54,7 +56,7 @@ TEST_CASE("CreateSingleColorImage: Faulty color value (invalid values)", "notCreatedColorFile", glm::dvec3(255.0, 0.0, 0.0) ).string(), - Catch::Matchers::Contains( + Catch::Matchers::Equals( "Invalid color. Expected three double values {r, g, b} in range 0 to 1" ) ); diff --git a/tests/test_profile.cpp b/tests/test_profile.cpp index 53f800df41..c201093fdc 100644 --- a/tests/test_profile.cpp +++ b/tests/test_profile.cpp @@ -22,7 +22,9 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include +#include +#include #include #include @@ -1036,7 +1038,7 @@ TEST_CASE("(Error) Version: Missing value 'major'", "[profile]") { "${TESTDIR}/profile/error/version/missing_major.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'version.major' field is missing") + Catch::Matchers::Equals("(profile) 'version.major' field is missing") ); } @@ -1045,7 +1047,7 @@ TEST_CASE("(Error) Version: Missing value 'minor'", "[profile]") { "${TESTDIR}/profile/error/version/missing_minor.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'version.minor' field is missing") + Catch::Matchers::Equals("(profile) 'version.minor' field is missing") ); } @@ -1054,7 +1056,7 @@ TEST_CASE("(Error) Version: Wrong type 'major'", "[profile]") { "${TESTDIR}/profile/error/version/wrongtype_major.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'version.major' must be a number") + Catch::Matchers::Equals("(profile) 'version.major' must be a number") ); } @@ -1063,7 +1065,7 @@ TEST_CASE("(Error) Version: Wrong type 'minor'", "[profile]") { "${TESTDIR}/profile/error/version/wrongtype_minor.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'version.minor' must be a number") + Catch::Matchers::Equals("(profile) 'version.minor' must be a number") ); } @@ -1072,7 +1074,7 @@ TEST_CASE("(Error) Version: Wrong type 'major' and 'minor'", "[profile]") { "${TESTDIR}/profile/error/version/wrongtype_major_minor.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'version.major' must be a number") + Catch::Matchers::Equals("(profile) 'version.major' must be a number") ); } @@ -1086,7 +1088,7 @@ TEST_CASE("(Error) Module: Missing value 'name'", "[profile]") { "${TESTDIR}/profile/error/module/missing_name.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'module.name' field is missing") + Catch::Matchers::Equals("(profile) 'module.name' field is missing") ); } @@ -1095,7 +1097,7 @@ TEST_CASE("(Error) Module: Wrong type 'name'", "[profile]") { "${TESTDIR}/profile/error/module/wrongtype_name.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'module.name' must be a string") + Catch::Matchers::Equals("(profile) 'module.name' must be a string") ); } @@ -1104,7 +1106,7 @@ TEST_CASE("(Error) Module: Wrong type 'loadedInstruction'", "[profile]") { "${TESTDIR}/profile/error/module/wrongtype_loadedInstruction.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'module.loadedInstruction' must be a string") + Catch::Matchers::Equals("(profile) 'module.loadedInstruction' must be a string") ); } @@ -1113,7 +1115,7 @@ TEST_CASE("(Error) Module: Wrong type 'notLoadedInstruction'", "[profile]") { "${TESTDIR}/profile/error/module/wrongtype_notLoadedInstruction.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'module.notLoadedInstruction' must be a string") + Catch::Matchers::Equals("(profile) 'module.notLoadedInstruction' must be a string") ); } @@ -1126,7 +1128,7 @@ TEST_CASE("(Error) Property: Missing value 'name'", "[profile]") { "${TESTDIR}/profile/error/property/missing_name.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'property.name' field is missing") + Catch::Matchers::Equals("(profile) 'property.name' field is missing") ); } @@ -1135,7 +1137,7 @@ TEST_CASE("(Error) Property: Missing value 'value'", "[profile]") { "${TESTDIR}/profile/error/property/missing_value.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'property.value' field is missing") + Catch::Matchers::Equals("(profile) 'property.value' field is missing") ); } @@ -1144,7 +1146,7 @@ TEST_CASE("(Error) Property: Missing value 'name' and 'value'", "[profile]") { "${TESTDIR}/profile/error/property/missing_name_value.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'property.name' field is missing") + Catch::Matchers::Equals("(profile) 'property.name' field is missing") ); } @@ -1153,7 +1155,7 @@ TEST_CASE("(Error) Property: Wrong value 'type'", "[profile]") { "${TESTDIR}/profile/error/property/wrongvalue_type.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("Unknown property set type") + Catch::Matchers::Equals("(profile) Unknown property set type") ); } @@ -1162,7 +1164,7 @@ TEST_CASE("(Error) Property: Wrong type 'name'", "[profile]") { "${TESTDIR}/profile/error/property/wrongtype_name.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'property.name' must be a string") + Catch::Matchers::Equals("(profile) 'property.name' must be a string") ); } @@ -1171,7 +1173,7 @@ TEST_CASE("(Error) Property: Wrong type 'value'", "[profile]") { "${TESTDIR}/profile/error/property/wrongtype_value.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'property.value' must be a string") + Catch::Matchers::Equals("(profile) 'property.value' must be a string") ); } @@ -1184,7 +1186,7 @@ TEST_CASE("(Error) Keybinding: Missing value 'key'", "[profile]") { "${TESTDIR}/profile/error/keybinding/missing_key.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'keybinding.key' field is missing") + Catch::Matchers::Equals("(profile) 'keybinding.key' field is missing") ); } @@ -1193,7 +1195,7 @@ TEST_CASE("(Error) Keybinding: Missing value 'documentation'", "[profile]") { "${TESTDIR}/profile/error/keybinding/missing_documentation.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'keybinding.documentation' field is missing") + Catch::Matchers::Equals("(profile) 'keybinding.documentation' field is missing") ); } @@ -1202,7 +1204,7 @@ TEST_CASE("(Error) Keybinding: Missing value 'name'", "[profile]") { "${TESTDIR}/profile/error/keybinding/missing_name.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'keybinding.name' field is missing") + Catch::Matchers::Equals("(profile) 'keybinding.name' field is missing") ); } @@ -1211,7 +1213,7 @@ TEST_CASE("(Error) Keybinding: Missing value 'gui_path'", "[profile]") { "${TESTDIR}/profile/error/keybinding/missing_guipath.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'keybinding.gui_path' field is missing") + Catch::Matchers::Equals("(profile) 'keybinding.gui_path' field is missing") ); } @@ -1220,7 +1222,7 @@ TEST_CASE("(Error) Keybinding: Missing value 'is_local'", "[profile]") { "${TESTDIR}/profile/error/keybinding/missing_islocal.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'keybinding.is_local' field is missing") + Catch::Matchers::Equals("(profile) 'keybinding.is_local' field is missing") ); } @@ -1229,7 +1231,7 @@ TEST_CASE("(Error) Keybinding: Wrong value 'key'", "[profile]") { "${TESTDIR}/profile/error/keybinding/wrongvalue_key.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("Could not find key for 'F50'") + Catch::Matchers::Equals("Could not find key for 'F50'") ); } @@ -1238,7 +1240,7 @@ TEST_CASE("(Error) Keybinding: Wrong value 'key, modifier'", "[profile]") { "${TESTDIR}/profile/error/keybinding/wrongvalue_modifier.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("Unknown modifier key 'KEYKEY'") + Catch::Matchers::Equals("Unknown modifier key 'KEYKEY'") ); } @@ -1247,7 +1249,7 @@ TEST_CASE("(Error) Keybinding: Wrong type 'documentation'", "[profile]") { "${TESTDIR}/profile/error/keybinding/wrongtype_documentation.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'keybinding.documentation' must be a string") + Catch::Matchers::Equals("(profile) 'keybinding.documentation' must be a string") ); } @@ -1256,7 +1258,7 @@ TEST_CASE("(Error) Keybinding: Wrong type 'gui_path'", "[profile]") { "${TESTDIR}/profile/error/keybinding/wrongtype_guipath.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'keybinding.gui_path' must be a string") + Catch::Matchers::Equals("(profile) 'keybinding.gui_path' must be a string") ); } @@ -1265,7 +1267,7 @@ TEST_CASE("(Error) Keybinding: Wrong type 'is_local'", "[profile]") { "${TESTDIR}/profile/error/keybinding/wrongtype_islocal.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'keybinding.is_local' must be a boolean") + Catch::Matchers::Equals("(profile) 'keybinding.is_local' must be a boolean") ); } @@ -1274,7 +1276,7 @@ TEST_CASE("(Error) Keybinding: Wrong type 'name'", "[profile]") { "${TESTDIR}/profile/error/keybinding/wrongtype_name.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'keybinding.name' must be a string") + Catch::Matchers::Equals("(profile) 'keybinding.name' must be a string") ); } @@ -1283,7 +1285,7 @@ TEST_CASE("(Error) Keybinding: Wrong type 'script'", "[profile]") { "${TESTDIR}/profile/error/keybinding/wrongtype_script.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'keybinding.script' must be a string") + Catch::Matchers::Equals("(profile) 'keybinding.script' must be a string") ); } @@ -1296,7 +1298,7 @@ TEST_CASE("(Error) Time: Wrong value 'type'", "[profile]") { "${TESTDIR}/profile/error/time/wrongvalue_type.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("Unknown time type") + Catch::Matchers::Equals("(profile) Unknown time type") ); } @@ -1305,7 +1307,7 @@ TEST_CASE("(Error) Time (absolute): Missing value 'type'", "[profile]") { "${TESTDIR}/profile/error/time/missing_type.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'time.type' field is missing") + Catch::Matchers::Equals("(profile) 'time.type' field is missing") ); } @@ -1314,7 +1316,7 @@ TEST_CASE("(Error) Time (relative): Missing value 'value'", "[profile]") { "${TESTDIR}/profile/error/time/relative_missing_value.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'time.value' field is missing") + Catch::Matchers::Equals("(profile) 'time.value' field is missing") ); } @@ -1326,7 +1328,7 @@ TEST_CASE("(Error) Deltatimes: Wrong type", "[profile]") { "${TESTDIR}/profile/error/deltatimes/wrongtype_value.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("type must be number, but is string") + Catch::Matchers::ContainsSubstring("type must be number, but is string") ); } @@ -1338,7 +1340,7 @@ TEST_CASE("(Error) Camera: Wrong value 'type'", "[profile]") { "${TESTDIR}/profile/error/camera/wrongvalue_type.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("Unknown camera type") + Catch::Matchers::Equals("(profile) Unknown camera type") ); } @@ -1347,7 +1349,7 @@ TEST_CASE("(Error) Camera (NavState): Missing value 'anchor'", "[profile]") { "${TESTDIR}/profile/error/camera/navstate_missing_anchor.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.anchor' field is missing") + Catch::Matchers::Equals("(profile) 'camera.anchor' field is missing") ); } @@ -1356,7 +1358,7 @@ TEST_CASE("(Error) Camera (NavState): Missing value 'frame'", "[profile]") { "${TESTDIR}/profile/error/camera/navstate_missing_frame.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.frame' field is missing") + Catch::Matchers::Equals("(profile) 'camera.frame' field is missing") ); } @@ -1365,7 +1367,7 @@ TEST_CASE("(Error) Camera (NavState): Missing value 'position'", "[profile]") { "${TESTDIR}/profile/error/camera/navstate_missing_position.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.position' field is missing") + Catch::Matchers::Equals("(profile) 'camera.position' field is missing") ); } @@ -1374,7 +1376,7 @@ TEST_CASE("(Error) Camera (NavState): Wrong type 'anchor'", "[profile]") { "${TESTDIR}/profile/error/camera/navstate_wrongtype_anchor.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.anchor' must be a string") + Catch::Matchers::Equals("(profile) 'camera.anchor' must be a string") ); } @@ -1383,7 +1385,7 @@ TEST_CASE("(Error) Camera (NavState): Wrong type 'aim'", "[profile]") { "${TESTDIR}/profile/error/camera/navstate_wrongtype_aim.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.aim' must be a string") + Catch::Matchers::Equals("(profile) 'camera.aim' must be a string") ); } @@ -1392,7 +1394,7 @@ TEST_CASE("(Error) Camera (NavState): Wrong type 'frame'", "[profile]") { "${TESTDIR}/profile/error/camera/navstate_wrongtype_frame.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.frame' must be a string") + Catch::Matchers::Equals("(profile) 'camera.frame' must be a string") ); } @@ -1401,7 +1403,7 @@ TEST_CASE("(Error) Camera (NavState): Wrong type 'position'", "[profile]") { "${TESTDIR}/profile/error/camera/navstate_wrongtype_position.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.position' must be an object") + Catch::Matchers::Equals("(profile) 'camera.position' must be an object") ); } @@ -1410,7 +1412,7 @@ TEST_CASE("(Error) Camera (NavState): Missing value 'position.x'", "[profile]") "${TESTDIR}/profile/error/camera/navstate_missing_position_x.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.position.x' field is missing") + Catch::Matchers::Equals("(profile) 'camera.position.x' field is missing") ); } @@ -1419,7 +1421,7 @@ TEST_CASE("(Error) Camera (NavState): Wrong type 'position.x'", "[profile]") { "${TESTDIR}/profile/error/camera/navstate_wrongtype_position_x.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.position.x' must be a number") + Catch::Matchers::Equals("(profile) 'camera.position.x' must be a number") ); } @@ -1428,7 +1430,7 @@ TEST_CASE("(Error) Camera (NavState): Missing value 'position.y'", "[profile]") "${TESTDIR}/profile/error/camera/navstate_missing_position_y.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.position.y' field is missing") + Catch::Matchers::Equals("(profile) 'camera.position.y' field is missing") ); } @@ -1437,7 +1439,7 @@ TEST_CASE("(Error) Camera (NavState): Wrong type 'position.y'", "[profile]") { "${TESTDIR}/profile/error/camera/navstate_wrongtype_position_y.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.position.y' must be a number") + Catch::Matchers::Equals("(profile) 'camera.position.y' must be a number") ); } @@ -1446,7 +1448,7 @@ TEST_CASE("(Error) Camera (NavState): Missing value 'position.z'", "[profile]") "${TESTDIR}/profile/error/camera/navstate_missing_position_z.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.position.z' field is missing") + Catch::Matchers::Equals("(profile) 'camera.position.z' field is missing") ); } @@ -1455,7 +1457,7 @@ TEST_CASE("(Error) Camera (NavState): Wrong type 'position.z'", "[profile]") { "${TESTDIR}/profile/error/camera/navstate_wrongtype_position_z.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.position.z' must be a number") + Catch::Matchers::Equals("(profile) 'camera.position.z' must be a number") ); } @@ -1464,7 +1466,7 @@ TEST_CASE("(Error) Camera (NavState): Wrong type 'up'", "[profile]") { "${TESTDIR}/profile/error/camera/navstate_wrongtype_up.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.up' must be an object") + Catch::Matchers::Equals("(profile) 'camera.up' must be an object") ); } @@ -1473,7 +1475,7 @@ TEST_CASE("(Error) Camera (NavState): Missing value 'up.x'", "[profile]") { "${TESTDIR}/profile/error/camera/navstate_missing_up_x.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.up.x' field is missing") + Catch::Matchers::Equals("(profile) 'camera.up.x' field is missing") ); } @@ -1482,7 +1484,7 @@ TEST_CASE("(Error) Camera (NavState): Wrong type 'up.x'", "[profile]") { "${TESTDIR}/profile/error/camera/navstate_wrongtype_up_x.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.up.x' must be a number") + Catch::Matchers::Equals("(profile) 'camera.up.x' must be a number") ); } @@ -1491,7 +1493,7 @@ TEST_CASE("(Error) Camera (NavState): Missing value 'up.y'", "[profile]") { "${TESTDIR}/profile/error/camera/navstate_missing_up_y.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.up.y' field is missing") + Catch::Matchers::Equals("(profile) 'camera.up.y' field is missing") ); } @@ -1500,7 +1502,7 @@ TEST_CASE("(Error) Camera (NavState): Wrong type 'up.y'", "[profile]") { "${TESTDIR}/profile/error/camera/navstate_wrongtype_up_y.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.up.y' must be a number") + Catch::Matchers::Equals("(profile) 'camera.up.y' must be a number") ); } @@ -1509,7 +1511,7 @@ TEST_CASE("(Error) Camera (NavState): Missing value 'up.z'", "[profile]") { "${TESTDIR}/profile/error/camera/navstate_missing_up_z.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.up.z' field is missing") + Catch::Matchers::Equals("(profile) 'camera.up.z' field is missing") ); } @@ -1518,7 +1520,7 @@ TEST_CASE("(Error) Camera (NavState): Wrong type 'up.z'", "[profile]") { "${TESTDIR}/profile/error/camera/navstate_wrongtype_up_z.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.up.z' must be a number") + Catch::Matchers::Equals("(profile) 'camera.up.z' must be a number") ); } @@ -1527,7 +1529,7 @@ TEST_CASE("(Error) Camera (NavState): Wrong type 'yaw'", "[profile]") { "${TESTDIR}/profile/error/camera/navstate_wrongtype_yaw.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.yaw' must be a number") + Catch::Matchers::Equals("(profile) 'camera.yaw' must be a number") ); } @@ -1536,7 +1538,7 @@ TEST_CASE("(Error) Camera (NavState): Wrong type 'pitch'", "[profile]") { "${TESTDIR}/profile/error/camera/navstate_wrongtype_pitch.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("camera.pitch' must be a number") + Catch::Matchers::Equals("(profile) 'camera.pitch' must be a number") ); } @@ -1545,7 +1547,7 @@ TEST_CASE("(Error) Camera (GoToGeo): Missing value 'anchor'", "[profile]") { "${TESTDIR}/profile/error/camera/gotogeo_missing_anchor.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.anchor' field is missing") + Catch::Matchers::Equals("(profile) 'camera.anchor' field is missing") ); } @@ -1554,7 +1556,7 @@ TEST_CASE("(Error) Camera (GoToGeo): Missing value 'latitude'", "[profile]") { "${TESTDIR}/profile/error/camera/gotogeo_missing_latitude.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.latitude' field is missing") + Catch::Matchers::Equals("(profile) 'camera.latitude' field is missing") ); } @@ -1563,7 +1565,7 @@ TEST_CASE("(Error) Camera (GoToGeo): Missing value 'longitude'", "[profile]") { "${TESTDIR}/profile/error/camera/gotogeo_missing_longitude.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.longitude' field is missing") + Catch::Matchers::Equals("(profile) 'camera.longitude' field is missing") ); } @@ -1572,7 +1574,7 @@ TEST_CASE("(Error) Camera (GoToGeo): Wrong type 'anchor'", "[profile]") { "${TESTDIR}/profile/error/camera/gotogeo_wrongtype_anchor.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.anchor' must be a string") + Catch::Matchers::Equals("(profile) 'camera.anchor' must be a string") ); } @@ -1581,7 +1583,7 @@ TEST_CASE("(Error) Camera (GoToGeo): Wrong type 'latitude'", "[profile]") { "${TESTDIR}/profile/error/camera/gotogeo_wrongtype_latitude.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.latitude' must be a number") + Catch::Matchers::Equals("(profile) 'camera.latitude' must be a number") ); } @@ -1590,7 +1592,7 @@ TEST_CASE("(Error) Camera (GoToGeo): Wrong type 'longitude'", "[profile]") { "${TESTDIR}/profile/error/camera/gotogeo_wrongtype_longitude.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.longitude' must be a number") + Catch::Matchers::Equals("(profile) 'camera.longitude' must be a number") ); } @@ -1599,6 +1601,6 @@ TEST_CASE("(Error) Camera (GoToGeo): Wrong type 'altitude'", "[profile]") { "${TESTDIR}/profile/error/camera/gotogeo_wrongtype_altitude.profile"; CHECK_THROWS_WITH( loadProfile(absPath(TestFile)), - Catch::Matchers::Contains("'camera.altitude' must be a number") + Catch::Matchers::Equals("(profile) 'camera.altitude' must be a number") ); } diff --git a/tests/test_rawvolumeio.cpp b/tests/test_rawvolumeio.cpp index e3134f780b..7f390c52a2 100644 --- a/tests/test_rawvolumeio.cpp +++ b/tests/test_rawvolumeio.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include #include #include diff --git a/tests/test_scriptscheduler.cpp b/tests/test_scriptscheduler.cpp index f5f17146c9..2dbcac374a 100644 --- a/tests/test_scriptscheduler.cpp +++ b/tests/test_scriptscheduler.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include #include #include diff --git a/tests/test_spicemanager.cpp b/tests/test_spicemanager.cpp index 180d1da253..981b1d455a 100644 --- a/tests/test_spicemanager.cpp +++ b/tests/test_spicemanager.cpp @@ -22,7 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include +#include #include #include @@ -332,9 +333,9 @@ TEST_CASE("SpiceManager: Get Target Position", "[spicemanager]") { ); }() ); - CHECK(pos[0] == Approx(targetPosition[0])); - CHECK(pos[1] == Approx(targetPosition[1])); - CHECK(pos[2] == Approx(targetPosition[2])); + CHECK(pos[0] == Catch::Approx(targetPosition[0])); + CHECK(pos[1] == Catch::Approx(targetPosition[1])); + CHECK(pos[2] == Catch::Approx(targetPosition[2])); openspace::SpiceManager::deinitialize(); } @@ -365,8 +366,8 @@ TEST_CASE("SpiceManager: Get Target State", "[spicemanager]") { // x,y,z for (int i = 0; i < 3; i++){ - CHECK(state[i] == Approx(res.position[i])); - CHECK(state[i+3] == Approx(res.velocity[i])); + CHECK(state[i] == Catch::Approx(res.position[i])); + CHECK(state[i+3] == Catch::Approx(res.velocity[i])); } openspace::SpiceManager::deinitialize(); @@ -395,7 +396,7 @@ TEST_CASE("SpiceManager: Transform matrix", "[spicemanager]") { // check for matrix consistency for (int i = 0; i < 6; i++) { for (int j = 0; j < 6; j++) { - CHECK(referenceMatrix[i][j] == Approx(stateMatrix[i * 6 + j])); + CHECK(referenceMatrix[i][j] == Catch::Approx(stateMatrix[i * 6 + j])); } } @@ -429,7 +430,7 @@ TEST_CASE("SpiceManager: Get Position Transform Matrix", "[spicemanager]") { // check for matrix consistency for (int i = 0; i < 3; i++) { for (int j = 0; j < 3; j++) { - CHECK(referenceMatrix[i][j] == Approx(positionMatrix[j][i])); + CHECK(referenceMatrix[i][j] == Catch::Approx(positionMatrix[j][i])); } } @@ -453,7 +454,7 @@ TEST_CASE("SpiceManager: Get Position Transform Matrix", "[spicemanager]") { position = positionMatrix * position; // check transformed values match for (int i = 0; i < 3; i++) { - CHECK(position[i] == Approx(state_t[i])); + CHECK(position[i] == Catch::Approx(state_t[i])); } openspace::SpiceManager::deinitialize(); @@ -489,7 +490,7 @@ TEST_CASE("SpiceManager: Get Field Of View", "[spicemanager]") { for (size_t i = 0; i < res.bounds.size(); i++) { for (size_t j = 0; j < 3; j++) { CHECK( - bounds_ref[i][j] == Approx(res.bounds[i][static_cast(j)]) + bounds_ref[i][j] == Catch::Approx(res.bounds[i][static_cast(j)]) ); } } diff --git a/tests/test_timeconversion.cpp b/tests/test_timeconversion.cpp index b892c1926c..9931326327 100644 --- a/tests/test_timeconversion.cpp +++ b/tests/test_timeconversion.cpp @@ -22,7 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include +#include #include @@ -134,92 +135,92 @@ TEST_CASE("TimeConversion: Simplify Time Round", "[timeconversion]") { TEST_CASE("TimeConversion: Simplify Time Fractional", "[timeconversion]") { { std::pair p = simplifyTime(32e-10, false); - CHECK(Approx(p.first) == 3.2); + CHECK(Catch::Approx(p.first) == 3.2); CHECK(p.second == "nanoseconds"); } { std::pair p = simplifyTime(32e-10, true); - CHECK(Approx(p.first) == 3.2); + CHECK(Catch::Approx(p.first) == 3.2); CHECK(p.second == "nanosecond"); } { std::pair p = simplifyTime(32e-7, false); - CHECK(Approx(p.first) == 3.2); + CHECK(Catch::Approx(p.first) == 3.2); CHECK(p.second == "microseconds"); } { std::pair p = simplifyTime(32e-7, true); - CHECK(Approx(p.first) == 3.2); + CHECK(Catch::Approx(p.first) == 3.2); CHECK(p.second == "microsecond"); } { std::pair p = simplifyTime(32e-4, false); - CHECK(Approx(p.first) == 3.2); + CHECK(Catch::Approx(p.first) == 3.2); CHECK(p.second == "milliseconds"); } { std::pair p = simplifyTime(32e-4, true); - CHECK(Approx(p.first) == 3.2); + CHECK(Catch::Approx(p.first) == 3.2); CHECK(p.second == "millisecond"); } { std::pair p = simplifyTime(3.2, false); - CHECK(Approx(p.first) == 3.2); + CHECK(Catch::Approx(p.first) == 3.2); CHECK(p.second == "seconds"); } { std::pair p = simplifyTime(3.2, true); - CHECK(Approx(p.first) == 3.2); + CHECK(Catch::Approx(p.first) == 3.2); CHECK(p.second == "second"); } { std::pair p = simplifyTime(192.0, false); - CHECK(Approx(p.first) == 3.2); + CHECK(Catch::Approx(p.first) == 3.2); CHECK(p.second == "minutes"); } { std::pair p = simplifyTime(192.0, true); - CHECK(Approx(p.first) == 3.2); + CHECK(Catch::Approx(p.first) == 3.2); CHECK(p.second == "minute"); } { std::pair p = simplifyTime(11520.0, false); - CHECK(Approx(p.first) == 3.2); + CHECK(Catch::Approx(p.first) == 3.2); CHECK(p.second == "hours"); } { std::pair p = simplifyTime(11520.0, true); - CHECK(Approx(p.first) == 3.2); + CHECK(Catch::Approx(p.first) == 3.2); CHECK(p.second == "hour"); } { std::pair p = simplifyTime(276480.0, false); - CHECK(Approx(p.first) == 3.2); + CHECK(Catch::Approx(p.first) == 3.2); CHECK(p.second == "days"); } { std::pair p = simplifyTime(276480.0, true); - CHECK(Approx(p.first) == 3.2); + CHECK(Catch::Approx(p.first) == 3.2); CHECK(p.second == "day"); } { std::pair p = simplifyTime(8415187.2, false); - CHECK(Approx(p.first) == 3.2); + CHECK(Catch::Approx(p.first) == 3.2); CHECK(p.second == "months"); } { std::pair p = simplifyTime(8415187.2, true); - CHECK(Approx(p.first) == 3.2); + CHECK(Catch::Approx(p.first) == 3.2); CHECK(p.second == "month"); } { std::pair p = simplifyTime(100982246.4, false); - CHECK(Approx(p.first) == 3.2); + CHECK(Catch::Approx(p.first) == 3.2); CHECK(p.second == "years"); } { std::pair p = simplifyTime(100982246.4, true); - CHECK(Approx(p.first) == 3.2); + CHECK(Catch::Approx(p.first) == 3.2); CHECK(p.second == "year"); } } @@ -351,37 +352,37 @@ TEST_CASE("TimeConversion: Split Time Fractional", "[timeconversion]") { { std::vector> p = splitTime(32e-10, false); REQUIRE(p.size() == 1); - CHECK(Approx(p[0].first) == 3.2); + CHECK(Catch::Approx(p[0].first) == 3.2); CHECK(p[0].second == "nanoseconds"); } { std::vector> p = splitTime(32e-10, true); REQUIRE(p.size() == 1); - CHECK(Approx(p[0].first) == 3.2); + CHECK(Catch::Approx(p[0].first) == 3.2); CHECK(p[0].second == "nanosecond"); } { std::vector> p = splitTime(32e-7, false); REQUIRE(p.size() == 2); - CHECK(Approx(p[0].first) == 3.0); + CHECK(Catch::Approx(p[0].first) == 3.0); CHECK(p[0].second == "microseconds"); - CHECK(Approx(p[1].first) == 200.0); + CHECK(Catch::Approx(p[1].first) == 200.0); CHECK(p[1].second == "nanoseconds"); } { std::vector> p = splitTime(32e-7, true); REQUIRE(p.size() == 2); - CHECK(Approx(p[0].first) == 3.0); + CHECK(Catch::Approx(p[0].first) == 3.0); CHECK(p[0].second == "microsecond"); - CHECK(Approx(p[1].first) == 200.0); + CHECK(Catch::Approx(p[1].first) == 200.0); CHECK(p[1].second == "nanosecond"); } { std::vector> p = splitTime(32e-4, false); REQUIRE(p.size() == 3); - CHECK(Approx(p[0].first) == 3.0); + CHECK(Catch::Approx(p[0].first) == 3.0); CHECK(p[0].second == "milliseconds"); - CHECK(Approx(p[1].first) == 200.0); + CHECK(Catch::Approx(p[1].first) == 200.0); CHECK(p[1].second == "microseconds"); // This is some floating point inaccuracy CHECK(p[2].first < 1e-3); @@ -390,9 +391,9 @@ TEST_CASE("TimeConversion: Split Time Fractional", "[timeconversion]") { { std::vector> p = splitTime(32e-4, true); REQUIRE(p.size() == 3); - CHECK(Approx(p[0].first) == 3.0); + CHECK(Catch::Approx(p[0].first) == 3.0); CHECK(p[0].second == "millisecond"); - CHECK(Approx(p[1].first) == 200.0); + CHECK(Catch::Approx(p[1].first) == 200.0); CHECK(p[1].second == "microsecond"); // This is some floating point inaccuracy CHECK(p[2].first < 1e-3); @@ -401,9 +402,9 @@ TEST_CASE("TimeConversion: Split Time Fractional", "[timeconversion]") { { std::vector> p = splitTime(3.2, false); REQUIRE(p.size() == 3); - CHECK(Approx(p[0].first) == 3.0); + CHECK(Catch::Approx(p[0].first) == 3.0); CHECK(p[0].second == "seconds"); - CHECK(Approx(p[1].first) == 200.0); + CHECK(Catch::Approx(p[1].first) == 200.0); CHECK(p[1].second == "milliseconds"); // This is some floating point inaccuracy CHECK(p[2].first < 1e-3); @@ -412,9 +413,9 @@ TEST_CASE("TimeConversion: Split Time Fractional", "[timeconversion]") { { std::vector> p = splitTime(3.2, true); REQUIRE(p.size() == 3); - CHECK(Approx(p[0].first) == 3.0); + CHECK(Catch::Approx(p[0].first) == 3.0); CHECK(p[0].second == "second"); - CHECK(Approx(p[1].first) == 200.0); + CHECK(Catch::Approx(p[1].first) == 200.0); CHECK(p[1].second == "millisecond"); // This is some floating point inaccuracy CHECK(p[2].first < 1e-3); @@ -423,145 +424,145 @@ TEST_CASE("TimeConversion: Split Time Fractional", "[timeconversion]") { { std::vector> p = splitTime(192.0, false); REQUIRE(p.size() == 2); - CHECK(Approx(p[0].first) == 3.0); + CHECK(Catch::Approx(p[0].first) == 3.0); CHECK(p[0].second == "minutes"); - CHECK(Approx(p[1].first) == 12.0); + CHECK(Catch::Approx(p[1].first) == 12.0); CHECK(p[1].second == "seconds"); } { std::vector> p = splitTime(192.0, true); REQUIRE(p.size() == 2); - CHECK(Approx(p[0].first) == 3.0); + CHECK(Catch::Approx(p[0].first) == 3.0); CHECK(p[0].second == "minute"); - CHECK(Approx(p[1].first) == 12.0); + CHECK(Catch::Approx(p[1].first) == 12.0); CHECK(p[1].second == "second"); } { std::vector> p = splitTime(11520.0, false); REQUIRE(p.size() == 2); - CHECK(Approx(p[0].first) == 3.0); + CHECK(Catch::Approx(p[0].first) == 3.0); CHECK(p[0].second == "hours"); - CHECK(Approx(p[1].first) == 12.0); + CHECK(Catch::Approx(p[1].first) == 12.0); CHECK(p[1].second == "minutes"); } { std::vector> p = splitTime(11520.0, true); REQUIRE(p.size() == 2); - CHECK(Approx(p[0].first) == 3.0); + CHECK(Catch::Approx(p[0].first) == 3.0); CHECK(p[0].second == "hour"); - CHECK(Approx(p[1].first) == 12.0); + CHECK(Catch::Approx(p[1].first) == 12.0); CHECK(p[1].second == "minute"); } { std::vector> p = splitTime(276480.0, false); REQUIRE(p.size() == 3); - CHECK(Approx(p[0].first) == 3.0); + CHECK(Catch::Approx(p[0].first) == 3.0); CHECK(p[0].second == "days"); - CHECK(Approx(p[1].first) == 4); + CHECK(Catch::Approx(p[1].first) == 4); CHECK(p[1].second == "hours"); - CHECK(Approx(p[2].first) == 48); + CHECK(Catch::Approx(p[2].first) == 48); CHECK(p[2].second == "minutes"); } { std::vector> p = splitTime(276480.0, true); REQUIRE(p.size() == 3); - CHECK(Approx(p[0].first) == 3.0); + CHECK(Catch::Approx(p[0].first) == 3.0); CHECK(p[0].second == "day"); - CHECK(Approx(p[1].first) == 4); + CHECK(Catch::Approx(p[1].first) == 4); CHECK(p[1].second == "hour"); - CHECK(Approx(p[2].first) == 48); + CHECK(Catch::Approx(p[2].first) == 48); CHECK(p[2].second == "minute"); } { std::vector> p = splitTime(8414838.0, false); REQUIRE(p.size() == 3); - CHECK(Approx(p[0].first) == 3.0); + CHECK(Catch::Approx(p[0].first) == 3.0); CHECK(p[0].second == "months"); - CHECK(Approx(p[1].first) == 6.0); + CHECK(Catch::Approx(p[1].first) == 6.0); CHECK(p[1].second == "days"); - CHECK(Approx(p[2].first) == 2.0); + CHECK(Catch::Approx(p[2].first) == 2.0); CHECK(p[2].second == "hours"); } { std::vector> p = splitTime(8414838.0, true); REQUIRE(p.size() == 3); - CHECK(Approx(p[0].first) == 3.0); + CHECK(Catch::Approx(p[0].first) == 3.0); CHECK(p[0].second == "month"); - CHECK(Approx(p[1].first) == 6.0); + CHECK(Catch::Approx(p[1].first) == 6.0); CHECK(p[1].second == "day"); - CHECK(Approx(p[2].first) == 2.0); + CHECK(Catch::Approx(p[2].first) == 2.0); CHECK(p[2].second == "hour"); } { std::vector> p = splitTime(100981548.0, false); REQUIRE(p.size() == 4); - CHECK(Approx(p[0].first) == 3.0); + CHECK(Catch::Approx(p[0].first) == 3.0); CHECK(p[0].second == "years"); - CHECK(Approx(p[1].first) == 2.0); + CHECK(Catch::Approx(p[1].first) == 2.0); CHECK(p[1].second == "months"); - CHECK(Approx(p[2].first) == 12.0); + CHECK(Catch::Approx(p[2].first) == 12.0); CHECK(p[2].second == "days"); - CHECK(Approx(p[3].first) == 4.0); + CHECK(Catch::Approx(p[3].first) == 4.0); CHECK(p[3].second == "hours"); } { std::vector> p = splitTime(100981548.0, true); REQUIRE(p.size() == 4); - CHECK(Approx(p[0].first) == 3.0); + CHECK(Catch::Approx(p[0].first) == 3.0); CHECK(p[0].second == "year"); - CHECK(Approx(p[1].first) == 2.0); + CHECK(Catch::Approx(p[1].first) == 2.0); CHECK(p[1].second == "month"); - CHECK(Approx(p[2].first) == 12.0); + CHECK(Catch::Approx(p[2].first) == 12.0); CHECK(p[2].second == "day"); - CHECK(Approx(p[3].first) == 4.0); + CHECK(Catch::Approx(p[3].first) == 4.0); CHECK(p[3].second == "hour"); } { std::vector> p = splitTime(100981676.388, false); REQUIRE(p.size() == 9); - CHECK(Approx(p[0].first) == 3.0); + CHECK(Catch::Approx(p[0].first) == 3.0); CHECK(p[0].second == "years"); - CHECK(Approx(p[1].first) == 2.0); + CHECK(Catch::Approx(p[1].first) == 2.0); CHECK(p[1].second == "months"); - CHECK(Approx(p[2].first) == 12.0); + CHECK(Catch::Approx(p[2].first) == 12.0); CHECK(p[2].second == "days"); - CHECK(Approx(p[3].first) == 4.0); + CHECK(Catch::Approx(p[3].first) == 4.0); CHECK(p[3].second == "hours"); - CHECK(Approx(p[4].first) == 2.0); + CHECK(Catch::Approx(p[4].first) == 2.0); CHECK(p[4].second == "minutes"); - CHECK(Approx(p[5].first) == 8.0); + CHECK(Catch::Approx(p[5].first) == 8.0); CHECK(p[5].second == "seconds"); - CHECK(Approx(p[6].first) == 387.0); + CHECK(Catch::Approx(p[6].first) == 387.0); CHECK(p[6].second == "milliseconds"); - CHECK(Approx(p[7].first) == 999.0); + CHECK(Catch::Approx(p[7].first) == 999.0); CHECK(p[7].second == "microseconds"); - CHECK(Approx(p[8].first) == 996.54293059); + CHECK(Catch::Approx(p[8].first) == 996.54293059); CHECK(p[8].second == "nanoseconds"); } { std::vector> p = splitTime(100981676.388, true); REQUIRE(p.size() == 9); - CHECK(Approx(p[0].first) == 3.0); + CHECK(Catch::Approx(p[0].first) == 3.0); CHECK(p[0].second == "year"); - CHECK(Approx(p[1].first) == 2.0); + CHECK(Catch::Approx(p[1].first) == 2.0); CHECK(p[1].second == "month"); - CHECK(Approx(p[2].first) == 12.0); + CHECK(Catch::Approx(p[2].first) == 12.0); CHECK(p[2].second == "day"); - CHECK(Approx(p[3].first) == 4.0); + CHECK(Catch::Approx(p[3].first) == 4.0); CHECK(p[3].second == "hour"); - CHECK(Approx(p[4].first) == 2.0); + CHECK(Catch::Approx(p[4].first) == 2.0); CHECK(p[4].second == "minute"); - CHECK(Approx(p[5].first) == 8.0); + CHECK(Catch::Approx(p[5].first) == 8.0); CHECK(p[5].second == "second"); - CHECK(Approx(p[6].first) == 387.0); + CHECK(Catch::Approx(p[6].first) == 387.0); CHECK(p[6].second == "millisecond"); - CHECK(Approx(p[7].first) == 999.0); + CHECK(Catch::Approx(p[7].first) == 999.0); CHECK(p[7].second == "microsecond"); - CHECK(Approx(p[8].first) == 996.54293059); + CHECK(Catch::Approx(p[8].first) == 996.54293059); CHECK(p[8].second == "nanosecond"); } } diff --git a/tests/test_timeline.cpp b/tests/test_timeline.cpp index 492be167e4..5e770cae5d 100644 --- a/tests/test_timeline.cpp +++ b/tests/test_timeline.cpp @@ -22,7 +22,8 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include +#include #include #include @@ -42,13 +43,13 @@ TEST_CASE("TimeLine: Query Keyframes", "[timeline]") { REQUIRE(timeline.nKeyframes() == 2); - CHECK(timeline.firstKeyframeAfter(0.0)->data == Approx(1.f)); - CHECK(timeline.firstKeyframeAfter(0.0, false)->data == Approx(1.f)); - CHECK(timeline.firstKeyframeAfter(0.0, true)->data == Approx(0.f)); + CHECK(timeline.firstKeyframeAfter(0.0)->data == Catch::Approx(1.f)); + CHECK(timeline.firstKeyframeAfter(0.0, false)->data == Catch::Approx(1.f)); + CHECK(timeline.firstKeyframeAfter(0.0, true)->data == Catch::Approx(0.f)); - CHECK(timeline.lastKeyframeBefore(1.0)->data == Approx(0.f)); - CHECK(timeline.lastKeyframeBefore(1.0, false)->data == Approx(0.f)); - CHECK(timeline.lastKeyframeBefore(1.0, true)->data == Approx(1.f)); + CHECK(timeline.lastKeyframeBefore(1.0)->data == Catch::Approx(0.f)); + CHECK(timeline.lastKeyframeBefore(1.0, false)->data == Catch::Approx(0.f)); + CHECK(timeline.lastKeyframeBefore(1.0, true)->data == Catch::Approx(1.f)); } TEST_CASE("TimeLine: Remove Keyframes", "[timeline]") { diff --git a/tests/test_timequantizer.cpp b/tests/test_timequantizer.cpp index b4868e585f..2a83989100 100644 --- a/tests/test_timequantizer.cpp +++ b/tests/test_timequantizer.cpp @@ -22,7 +22,7 @@ * OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * ****************************************************************************************/ -#include "catch2/catch.hpp" +#include #include "modules/globebrowsing/src/timequantizer.h" #include