Skip to content

Commit 219ecd1

Browse files
committed
add doctest include wrapper to avoid linker problems
1 parent ff01094 commit 219ecd1

30 files changed

+40
-29
lines changed

test/async_auto_reset_event_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include <vector>
1919

2020
#include <ostream>
21-
#include "doctest/doctest.h"
21+
#include "doctest/cppcoro_doctest.h"
2222

2323
TEST_SUITE_BEGIN("async_auto_reset_event");
2424

test/async_generator_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <cppcoro/when_all.hpp>
1111

1212
#include <ostream>
13-
#include "doctest/doctest.h"
13+
#include "doctest/cppcoro_doctest.h"
1414

1515
TEST_SUITE_BEGIN("async_generator");
1616

test/async_latch_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <cppcoro/sync_wait.hpp>
1111

1212
#include <ostream>
13-
#include "doctest/doctest.h"
13+
#include "doctest/cppcoro_doctest.h"
1414

1515
TEST_SUITE_BEGIN("async_latch");
1616

test/async_manual_reset_event_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <cppcoro/sync_wait.hpp>
1010
#include <cppcoro/when_all_ready.hpp>
1111

12-
#include "doctest/doctest.h"
12+
#include "doctest/cppcoro_doctest.h"
1313

1414
TEST_SUITE_BEGIN("async_manual_reset_event");
1515

test/async_mutex_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#include <cppcoro/sync_wait.hpp>
1111

1212
#include <ostream>
13-
#include "doctest/doctest.h"
13+
#include "doctest/cppcoro_doctest.h"
1414

1515
TEST_SUITE_BEGIN("async_mutex");
1616

test/cancellation_token_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <thread>
1212

1313
#include <ostream>
14-
#include "doctest/doctest.h"
14+
#include "doctest/cppcoro_doctest.h"
1515

1616
TEST_SUITE_BEGIN("cancellation_token tests");
1717

test/doctest/cppcoro_doctest.h

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
///////////////////////////////////////////////////////////////////////////////
2+
// Copyright (c) Andreas Buhr
3+
// Licenced under MIT license. See LICENSE.txt for details.
4+
///////////////////////////////////////////////////////////////////////////////
5+
#ifndef CPPCORO_CPPCORO_DOCTEST_H_INCLUDED
6+
#define CPPCORO_CPPCORO_DOCTEST_H_INCLUDED
7+
8+
#define DOCTEST_CONFIG_USE_STD_HEADERS
9+
#include "doctest.h"
10+
11+
#endif

test/file_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "io_service_fixture.hpp"
2222

2323
#include <ostream>
24-
#include "doctest/doctest.h"
24+
#include "doctest/cppcoro_doctest.h"
2525

2626
TEST_SUITE_BEGIN("file");
2727

test/generator_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <string>
1313
#include <forward_list>
1414

15-
#include "doctest/doctest.h"
15+
#include "doctest/cppcoro_doctest.h"
1616

1717
TEST_SUITE_BEGIN("generator");
1818

test/io_service_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include <vector>
1919

2020
#include <ostream>
21-
#include "doctest/doctest.h"
21+
#include "doctest/cppcoro_doctest.h"
2222

2323
TEST_SUITE_BEGIN("io_service");
2424

test/ip_address_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include <cppcoro/net/ip_address.hpp>
77

8-
#include "doctest/doctest.h"
8+
#include "doctest/cppcoro_doctest.h"
99

1010
TEST_SUITE_BEGIN("ip_address");
1111

test/ip_endpoint_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <cppcoro/config.hpp>
77
#include <cppcoro/net/ip_endpoint.hpp>
88

9-
#include "doctest/doctest.h"
9+
#include "doctest/cppcoro_doctest.h"
1010

1111
TEST_SUITE_BEGIN("ip_endpoint");
1212

test/ipv4_address_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include <cppcoro/net/ipv4_address.hpp>
77

8-
#include "doctest/doctest.h"
8+
#include "doctest/cppcoro_doctest.h"
99

1010

1111
TEST_SUITE_BEGIN("ipv4_address");

test/ipv4_endpoint_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include <cppcoro/net/ipv4_endpoint.hpp>
77

8-
#include "doctest/doctest.h"
8+
#include "doctest/cppcoro_doctest.h"
99

1010
TEST_SUITE_BEGIN("ip_endpoint");
1111

test/ipv6_address_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include <cppcoro/net/ipv6_address.hpp>
77

8-
#include "doctest/doctest.h"
8+
#include "doctest/cppcoro_doctest.h"
99

1010

1111
TEST_SUITE_BEGIN("ipv6_address");

test/ipv6_endpoint_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <cppcoro/config.hpp>
77
#include <cppcoro/net/ipv6_endpoint.hpp>
88

9-
#include "doctest/doctest.h"
9+
#include "doctest/cppcoro_doctest.h"
1010

1111
TEST_SUITE_BEGIN("ipv6_endpoint");
1212

test/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
///////////////////////////////////////////////////////////////////////////////
55

66
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
7-
#include "doctest/doctest.h"
7+
#include "doctest/cppcoro_doctest.h"

test/multi_producer_sequencer_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include <chrono>
1919

2020
#include <ostream>
21-
#include "doctest/doctest.h"
21+
#include "doctest/cppcoro_doctest.h"
2222

2323
DOCTEST_TEST_SUITE_BEGIN("multi_producer_sequencer");
2424

test/recursive_generator_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#include <algorithm>
1212

1313
#include <ostream>
14-
#include "doctest/doctest.h"
14+
#include "doctest/cppcoro_doctest.h"
1515

1616
TEST_SUITE_BEGIN("recursive_generator");
1717

test/scheduling_operator_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "io_service_fixture.hpp"
1515

1616
#include <ostream>
17-
#include "doctest/doctest.h"
17+
#include "doctest/cppcoro_doctest.h"
1818

1919
TEST_SUITE_BEGIN("schedule/resume_on");
2020

test/sequence_barrier_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <stdio.h>
1616
#include <thread>
1717

18-
#include "doctest/doctest.h"
18+
#include "doctest/cppcoro_doctest.h"
1919

2020
DOCTEST_TEST_SUITE_BEGIN("sequence_barrier");
2121

test/shared_task_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <ostream>
1616
#include <string>
1717

18-
#include "doctest/doctest.h"
18+
#include "doctest/cppcoro_doctest.h"
1919

2020
TEST_SUITE_BEGIN("shared_task");
2121

test/single_consumer_async_auto_reset_event_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <cassert>
1818
#include <vector>
1919

20-
#include "doctest/doctest.h"
20+
#include "doctest/cppcoro_doctest.h"
2121

2222
TEST_SUITE_BEGIN("single_consumer_async_auto_reset_event");
2323

test/single_producer_sequencer_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <thread>
1818

1919
#include <ostream>
20-
#include "doctest/doctest.h"
20+
#include "doctest/cppcoro_doctest.h"
2121

2222
DOCTEST_TEST_SUITE_BEGIN("single_producer_sequencer");
2323

test/socket_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <cppcoro/cancellation_token.hpp>
1414
#include <cppcoro/async_scope.hpp>
1515

16-
#include "doctest/doctest.h"
16+
#include "doctest/cppcoro_doctest.h"
1717

1818
using namespace cppcoro;
1919
using namespace cppcoro::net;

test/static_thread_pool_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <iostream>
1616
#include <numeric>
1717

18-
#include "doctest/doctest.h"
18+
#include "doctest/cppcoro_doctest.h"
1919

2020
TEST_SUITE_BEGIN("static_thread_pool");
2121

test/sync_wait_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <string>
1515
#include <type_traits>
1616

17-
#include "doctest/doctest.h"
17+
#include "doctest/cppcoro_doctest.h"
1818

1919
TEST_SUITE_BEGIN("sync_wait");
2020

test/task_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#include <string>
1616
#include <type_traits>
1717

18-
#include "doctest/doctest.h"
18+
#include "doctest/cppcoro_doctest.h"
1919

2020
TEST_SUITE_BEGIN("task");
2121

test/when_all_ready_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#include <vector>
1818

1919
#include <ostream>
20-
#include "doctest/doctest.h"
20+
#include "doctest/cppcoro_doctest.h"
2121

2222
TEST_SUITE_BEGIN("when_all_ready");
2323

test/when_all_tests.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include <vector>
2121

2222
#include <ostream>
23-
#include "doctest/doctest.h"
23+
#include "doctest/cppcoro_doctest.h"
2424

2525
TEST_SUITE_BEGIN("when_all");
2626

0 commit comments

Comments
 (0)