Fix build of unit tests

This commit is contained in:
King_DuckZ 2024-04-19 23:18:26 +02:00
parent fc5f917970
commit cd85666005
11 changed files with 13 additions and 11 deletions

2
.gitignore vendored
View File

@ -2,3 +2,5 @@ tags
compile_commands.json
.clangd
.cache
subprojects/Catch2/
subprojects/sprout/

View File

@ -3,4 +3,4 @@ revision = 05e10dfccc28c7f973727c54f850237d07d5e10f
url = https://github.com/catchorg/Catch2.git
[provide]
catch2_dep = Catch2-3.5.2
Catch2 = catch2_with_main_dep

View File

@ -15,7 +15,7 @@
* along with "duckhandy". If not, see <http://www.gnu.org/licenses/>.
*/
#include "catch2/catch.hpp"
#include "catch2/catch_test_macros.hpp"
#include "duckhandy/bitfield_pack.hpp"
#include <cstdint>

View File

@ -15,7 +15,7 @@
* along with "duckhandy". If not, see <http://www.gnu.org/licenses/>.
*/
#include "catch2/catch.hpp"
#include "catch2/catch_test_macros.hpp"
#include "duckhandy/endianness.hpp"
#include <endian.h>

View File

@ -15,7 +15,7 @@
* along with "duckhandy". If not, see <http://www.gnu.org/licenses/>.
*/
#include "catch2/catch.hpp"
#include "catch2/catch_test_macros.hpp"
#include "duckhandy/int_conv.hpp"
#include "duckhandy/string_bt.hpp"
#include "sprout/cstring/strlen.hpp"

View File

@ -15,5 +15,5 @@
* along with "duckhandy". If not, see <http://www.gnu.org/licenses/>.
*/
#define CATCH_CONFIG_MAIN
#include "catch2/catch.hpp"
//#define CATCH_CONFIG_MAIN
//#include "catch2/catch_test_macros.hpp"

View File

@ -1,4 +1,4 @@
catch2_dep = dependency('Catch2', fallback: ['Catch2', 'catch2_dep'])
catch2_dep = dependency('Catch2', version: '>=3.5.2')
unit_test_prog = executable(meson.project_name(),
'int_conv_test.cpp',

View File

@ -15,7 +15,7 @@
* along with "duckhandy". If not, see <http://www.gnu.org/licenses/>.
*/
#include "catch2/catch.hpp"
#include "catch2/catch_test_macros.hpp"
#include "duckhandy/resource_pool.hpp"
#include <cstdint>

View File

@ -15,7 +15,7 @@
* along with "duckhandy". If not, see <http://www.gnu.org/licenses/>.
*/
#include "catch2/catch.hpp"
#include "catch2/catch_test_macros.hpp"
#include "duckhandy/implem/reversed_sized_array_bt.hpp"
TEST_CASE ("Check conversion functions in ReversedSizedArray", "[ReversedSizedArray][containers]") {

View File

@ -15,7 +15,7 @@
* along with "duckhandy". If not, see <http://www.gnu.org/licenses/>.
*/
#include "catch2/catch.hpp"
#include "catch2/catch_test_macros.hpp"
#include "duckhandy/tiger_bt.hpp"
TEST_CASE("Build-time Tiger hash tests", "[hash][bt][tiger]") {

View File

@ -15,7 +15,7 @@
* along with "duckhandy". If not, see <http://www.gnu.org/licenses/>.
*/
#include "catch2/catch.hpp"
#include "catch2/catch_test_macros.hpp"
#include "duckhandy/version_bt.hpp"
TEST_CASE ("Version class tests", "[version][bt]") {