Skip to content

Commit 1dc9e5b

Browse files
committed
use static library version of Boost.Test
1 parent 5ed337e commit 1dc9e5b

15 files changed

+26
-25
lines changed

test/test_compiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "test_util.hpp"
1313

1414
#define BOOST_TEST_MODULE compiler
15-
#include <boost/test/included/unit_test.hpp>
15+
#include <boost/test/unit_test.hpp>
1616

1717
using namespace boost::openmethod;
1818

test/test_core.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <type_traits>
88

99
#define BOOST_TEST_MODULE core
10-
#include <boost/test/included/unit_test.hpp>
10+
#include <boost/test/unit_test.hpp>
1111

1212
#include <boost/openmethod/registry.hpp>
1313

test/test_custom_rtti.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// or copy at http://www.boost.org/LICENSE_1_0.txt)
55

66
#define BOOST_TEST_MODULE openmethod
7-
#include <boost/test/included/unit_test.hpp>
7+
#include <boost/test/unit_test.hpp>
88
#include <boost/utility/identity_type.hpp>
99

1010
#include <boost/openmethod.hpp>
@@ -448,7 +448,7 @@ struct custom_rtti : policies::deferred_static_rtti {
448448
if constexpr (is_polymorphic<T>) {
449449
return type_id(T::static_type);
450450
} else {
451-
return nullptr;
451+
return type_id(0);
452452
}
453453
}
454454

@@ -457,14 +457,14 @@ struct custom_rtti : policies::deferred_static_rtti {
457457
if constexpr (is_polymorphic<T>) {
458458
return type_id(obj.type);
459459
} else {
460-
return nullptr;
460+
return type_id(0);
461461
}
462462
}
463463

464464
template<class Stream>
465465
static void type_name(type_id type, Stream& stream) {
466-
static const char* name[] = {"Animal", "Dog", "Cat"};
467-
stream << (type == nullptr ? "?" : name[std::size_t(type)]);
466+
static const char* name[] = {"?", "Animal", "Dog", "Cat"};
467+
stream << name[std::size_t(type)];
468468
}
469469

470470
static auto type_index(type_id type) {

test/test_dispatch.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "test_util.hpp"
2020

2121
#define BOOST_TEST_MODULE openmethod
22-
#include <boost/test/included/unit_test.hpp>
22+
#include <boost/test/unit_test.hpp>
2323

2424
using namespace boost::openmethod;
2525

test/test_intrusive.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ struct test_registry
1919
#include <boost/openmethod/with_vptr.hpp>
2020
#include <boost/openmethod/compiler.hpp>
2121

22-
#define BOOST_TEST_MODULE instrusive
23-
#include <boost/test/included/unit_test.hpp>
22+
#define BOOST_TEST_MODULE intrusive
23+
#include <boost/test/unit_test.hpp>
2424
#include <boost/test/tools/output_test_stream.hpp>
2525

2626
#include "test_util.hpp"

test/test_member_method.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ struct Payroll {
5252
BOOST_OPENMETHOD_REGISTER(Payroll::pay_functions);
5353

5454
#define BOOST_TEST_MODULE openmethod
55-
#include <boost/test/included/unit_test.hpp>
55+
#include <boost/test/unit_test.hpp>
5656

5757
BOOST_AUTO_TEST_CASE(member_method) {
5858
initialize();

test/test_n2216.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#include "test_util.hpp"
1919

2020
#define BOOST_TEST_MODULE openmethod
21-
#include <boost/test/included/unit_test.hpp>
21+
#include <boost/test/unit_test.hpp>
2222

2323
using namespace boost::openmethod;
2424

test/test_pointer_to_method.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <string>
1010

1111
#define BOOST_TEST_MODULE openmethod
12-
#include <boost/test/included/unit_test.hpp>
12+
#include <boost/test/unit_test.hpp>
1313

1414
using boost::openmethod::virtual_;
1515

test/test_policies.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
#include <iostream>
77
#include <type_traits>
88

9-
#define BOOST_TEST_MODULE core
10-
#include <boost/test/included/unit_test.hpp>
9+
#define BOOST_TEST_MODULE policies
10+
#include <boost/test/unit_test.hpp>
1111

1212
#include <boost/openmethod/default_registry.hpp>
1313

test/test_runtime_errors.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <sstream>
1515

1616
#define BOOST_TEST_MODULE openmethod
17-
#include <boost/test/included/unit_test.hpp>
17+
#include <boost/test/unit_test.hpp>
1818

1919
using namespace boost::openmethod;
2020
using namespace test_matrices;
@@ -168,8 +168,8 @@ BOOST_OPENMETHOD_OVERRIDE(
168168

169169
BOOST_AUTO_TEST_CASE(call_error) {
170170
auto report = initialize<registry>().report;
171-
BOOST_TEST(report.not_implemented == 1);
172-
BOOST_TEST(report.ambiguous == 1);
171+
BOOST_TEST(report.not_implemented == 1u);
172+
BOOST_TEST(report.ambiguous == 1u);
173173

174174
{
175175
registry::capture capture;

0 commit comments

Comments
 (0)