Skip to content

Commit 1a18152

Browse files
committed
chore: apply code style on adapter-headers
1 parent 96312ce commit 1a18152

File tree

4 files changed

+16
-19
lines changed

4 files changed

+16
-19
lines changed

include/mimic++/adapters/BoostTest.hpp

+5-8
Original file line numberDiff line numberDiff line change
@@ -29,23 +29,20 @@ namespace mimicpp::reporting::detail::boost_test
2929
};
3030

3131
[[noreturn]]
32-
inline void send_fail(const StringViewT msg)
32+
inline void send_fail(StringViewT const msg)
3333
{
3434
BOOST_TEST_FAIL(msg);
3535
unreachable();
3636
}
3737

38-
inline void send_success(const StringViewT msg)
38+
inline void send_success(StringViewT const msg)
3939
{
4040
BOOST_TEST_MESSAGE(msg);
4141
}
4242

43-
inline void send_warning(const StringViewT msg)
43+
inline void send_warning(StringViewT const msg)
4444
{
45-
BOOST_TEST_MESSAGE(
46-
format::format(
47-
"warning: {}",
48-
msg));
45+
BOOST_TEST_MESSAGE("warning: ") << msg.data();
4946
}
5047
}
5148

@@ -72,7 +69,7 @@ namespace mimicpp::reporting
7269
namespace mimicpp::reporting::detail::boost_test
7370
{
7471
[[maybe_unused]]
75-
inline const ReporterInstaller<BoostTestReporterT> installer{};
72+
inline ReporterInstaller<BoostTestReporterT> const installer{};
7673
}
7774

7875
#endif

include/mimic++/adapters/Catch2.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
namespace mimicpp::reporting::detail::catch2
2626
{
2727
[[noreturn]]
28-
inline void send_fail(const StringViewT msg)
28+
inline void send_fail(StringViewT const msg)
2929
{
3030
#ifdef CATCH_CONFIG_PREFIX_ALL
3131
CATCH_FAIL(msg);
@@ -36,7 +36,7 @@ namespace mimicpp::reporting::detail::catch2
3636
unreachable();
3737
}
3838

39-
inline void send_success(const StringViewT msg)
39+
inline void send_success(StringViewT const msg)
4040
{
4141
#ifdef CATCH_CONFIG_PREFIX_ALL
4242
CATCH_SUCCEED(msg);
@@ -45,7 +45,7 @@ namespace mimicpp::reporting::detail::catch2
4545
#endif
4646
}
4747

48-
inline void send_warning(const StringViewT msg)
48+
inline void send_warning(StringViewT const msg)
4949
{
5050
#ifdef CATCH_CONFIG_PREFIX_MESSAGES
5151
CATCH_WARN(msg);

include/mimic++/adapters/Doctest.hpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,18 @@ namespace mimicpp::reporting::detail::doctest
2727
using namespace ::doctest;
2828

2929
[[noreturn]]
30-
inline void send_fail(const StringViewT msg)
30+
inline void send_fail(StringViewT const msg)
3131
{
3232
DOCTEST_FAIL(msg);
3333
unreachable();
3434
}
3535

36-
inline void send_success(const StringViewT msg)
36+
inline void send_success(StringViewT const msg)
3737
{
3838
DOCTEST_REQUIRE_MESSAGE(true, msg);
3939
}
4040

41-
inline void send_warning(const StringViewT msg)
41+
inline void send_warning(StringViewT const msg)
4242
{
4343
DOCTEST_MESSAGE(msg);
4444
}
@@ -67,7 +67,7 @@ namespace mimicpp::reporting
6767
namespace mimicpp::reporting::detail::doctest
6868
{
6969
[[maybe_unused]]
70-
inline const ReporterInstaller<DoctestReporterT> installer{};
70+
inline ReporterInstaller<DoctestReporterT> const installer{};
7171
}
7272

7373
#endif

include/mimic++/adapters/gtest.hpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ namespace mimicpp::reporting::detail::gtest
2828
};
2929

3030
[[noreturn]]
31-
inline void send_fail(const StringViewT& msg)
31+
inline void send_fail(StringViewT const msg)
3232
{
3333
// GTEST_FAIL has an immediate return
3434
std::invoke(
@@ -39,12 +39,12 @@ namespace mimicpp::reporting::detail::gtest
3939
throw failure{};
4040
}
4141

42-
inline void send_success(const StringViewT& msg)
42+
inline void send_success(StringViewT const msg)
4343
{
4444
GTEST_SUCCEED() << msg;
4545
}
4646

47-
inline void send_warning([[maybe_unused]] const StringViewT& msg)
47+
inline void send_warning([[maybe_unused]] StringViewT const msg)
4848
{
4949
// seems unsupported
5050
}
@@ -73,7 +73,7 @@ namespace mimicpp::reporting
7373
namespace mimicpp::reporting::detail::gtest
7474
{
7575
[[maybe_unused]]
76-
inline const ReporterInstaller<GTestReporterT> installer{};
76+
inline ReporterInstaller<GTestReporterT> const installer{};
7777
}
7878

7979
#endif

0 commit comments

Comments
 (0)