Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions subprojects/catch2.wrap
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
[wrap-git]
url = https://github.com/catchorg/Catch2.git
revision = d4b0b34561a0ffe71216894caa35694e1aabdd5b
directory = Catch2
patch_directory = Catch2
[wrap-file]
directory = Catch2-3.14.0
source_url = https://github.com/catchorg/Catch2/archive/v3.14.0.tar.gz
source_filename = Catch2-3.14.0.tar.gz
source_hash = ba2a939efead3c833c499cf487e185762f419a71d30158cd1b43c6079c586490
source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/catch2_3.14.0-1/Catch2-3.14.0.tar.gz
wrapdb_version = 3.14.0-1

[provide]
catch2 = catch2_dep
catch2 = catch2_dep
catch2-with-main = catch2_with_main_dep
19 changes: 0 additions & 19 deletions subprojects/packagefiles/Catch2/LICENSE.build

This file was deleted.

9 changes: 0 additions & 9 deletions subprojects/packagefiles/Catch2/meson.build

This file was deleted.

19 changes: 16 additions & 3 deletions tests/meson.build
Original file line number Diff line number Diff line change
@@ -1,17 +1,30 @@
catch = subproject('catch2').get_variable('catch2_dep')
catch = dependency('catch2-with-main', default_options: ['tests=false'])

sources = [
demos = [
'demo.cpp',
'demo-fmtlib.cpp',
'demo-stdfmt.cpp',
]

test_sources = [
'test.cpp',
'test-fmtlib.cpp',
'test-stdfmt.cpp',
]

tests = []

foreach src : sources
foreach src : demos
exec_name = src.replace('.cpp', '.out')
exe = executable(exec_name,
src,
include_directories : incdir,
dependencies : deps)
tests += [exe]
test(exec_name, exe)
endforeach

foreach src : test_sources
exec_name = src.replace('.cpp', '.out')
exe = executable(exec_name,
src,
Expand Down
2 changes: 0 additions & 2 deletions tests/test-fmtlib.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define CATCH_CONFIG_MAIN
#define FMT_HEADER_ONLY
#ifndef BARKEEP_ENABLE_FMT_FORMAT
#define BARKEEP_ENABLE_FMT_FORMAT
Expand All @@ -8,7 +7,6 @@
#include <string>
#include <tuple>
#include <barkeep/barkeep.h>
#include <catch2/catch.hpp>

#include "testutil.h"

Expand Down
2 changes: 0 additions & 2 deletions tests/test-stdfmt.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#define CATCH_CONFIG_MAIN
#ifndef BARKEEP_ENABLE_STD_FORMAT
#define BARKEEP_ENABLE_STD_FORMAT
#endif
Expand All @@ -7,7 +6,6 @@
#include <string>
#include <tuple>
#include <barkeep/barkeep.h>
#include <catch2/catch.hpp>

#include "testutil.h"

Expand Down
3 changes: 0 additions & 3 deletions tests/test.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
#define CATCH_CONFIG_MAIN

#include <atomic>
#include <functional>
#include <string>
#include <tuple>
#include <vector>
#include <barkeep/barkeep.h>
#include <catch2/catch.hpp>

#include "testutil.h"

Expand Down
4 changes: 3 additions & 1 deletion tests/testutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
#include <string>
#include <vector>

#include <catch2/catch.hpp>
#include <catch2/catch_template_test_macros.hpp>
#include <catch2/catch_test_macros.hpp>
#include <catch2/generators/catch_generators.hpp>

std::vector<std::string> split(const std::string& s, char delim) {
std::vector<std::string> elems;
Expand Down
Loading