tests: add proper catch2 handling

Add proper catch2 support:
 - add catch2 as a submodule
 - add cmake function to add test easily
 - discover each test in test binary
 - remove copies of catch.hpp
 - do not try to process tests for rt1051

Do not test internals of utf8, only public interface (nasty bugs could
occur otherwise).

Signed-off-by: Marcin Smoczyński <smoczynski.marcin@gmail.com>
This commit is contained in:
Marcin Smoczyński committed 2020-06-24 10:38:14 +02:00
1 parent b27dec2025
commit a9cb37d7f4
54 files changed
+337 -109880

No files matched your search

+2 -2
View File
@@ -6,7 +6,7 @@
#define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one cpp file
#include "catch.hpp"
#include <catch2/catch.hpp>
#include "Utils.hpp"
@@ -25,7 +25,7 @@ TEST_CASE("Split tests")
REQUIRE(ret[5] == "FINISHED");
REQUIRE(ret[6] == "");
ret = utils::split(inputStr1, delimiter);
ret = utils::split(inputStr1, delimiter);
REQUIRE(ret.size() == 3);
REQUIRE(ret[0] == "OK");
REQUIRE(ret[1] == "NO CARRIER");