Skip to content

Commit ea7dcc5

Browse files
committed
Generated single header files.
1 parent ea680db commit ea7dcc5

File tree

11 files changed

+10120
-93
lines changed

11 files changed

+10120
-93
lines changed

single_header/boost/fakeit.hpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
* FakeIt - A Simplified C++ Mocking Framework
44
* Copyright (c) Eran Pe'er 2013
5-
* Generated: 2022-05-22 19:04:08.688985
5+
* Generated: 2022-06-12 10:26:04.711108
66
* Distributed under the MIT License. Please refer to the LICENSE file at:
77
* https://github.com/eranpeer/FakeIt
88
*/
@@ -6372,6 +6372,7 @@ namespace fakeit {
63726372
};
63736373

63746374
}
6375+
#include <cmath>
63756376
#include <cstring>
63766377

63776378

@@ -7777,7 +7778,7 @@ namespace fakeit {
77777778
template <typename T, int N>
77787779
struct ArgValue
77797780
{
7780-
ArgValue(T &&v): value { std::forward<T>(v) } {}
7781+
ArgValue(T &&v): value ( std::forward<T>(v) ) {}
77817782
constexpr static int pos = N;
77827783
T value;
77837784
};
@@ -8070,6 +8071,12 @@ namespace fakeit {
80708071
template<std::size_t N>
80718072
using NakedArgType = typename naked_type<ArgType<index>>::type;
80728073

8074+
template <typename MatcherCreatorT, typename = void>
8075+
struct IsMatcherCreatorTypeCompatible : std::false_type {};
8076+
8077+
template <typename MatcherCreatorT>
8078+
struct IsMatcherCreatorTypeCompatible<MatcherCreatorT, typename std::enable_if<MatcherCreatorT::template IsTypeCompatible<NakedArgType<index>>::value, void>::type> : std::true_type {};
8079+
80738080
MatchersCollector(std::vector<Destructible *> &matchers)
80748081
: _matchers(matchers) {
80758082
}
@@ -8079,6 +8086,8 @@ namespace fakeit {
80798086

80808087
template<typename Head>
80818088
typename std::enable_if<
8089+
!std::is_same<AnyMatcher, typename naked_type<Head>::type>::value &&
8090+
!IsMatcherCreatorTypeCompatible<typename naked_type<Head>::type>::value &&
80828091
std::is_constructible<NakedArgType<index>, Head&&>::value, void>
80838092
::type CollectMatchers(Head &&value) {
80848093

@@ -8088,7 +8097,7 @@ namespace fakeit {
80888097

80898098
template<typename Head>
80908099
typename std::enable_if<
8091-
naked_type<Head>::type::template IsTypeCompatible<NakedArgType<index>>::value, void>
8100+
IsMatcherCreatorTypeCompatible<typename naked_type<Head>::type>::value, void>
80928101
::type CollectMatchers(Head &&creator) {
80938102
TypedMatcher<NakedArgType<index>> *d = creator.template createMatcher<NakedArgType<index>>();
80948103
_matchers.push_back(d);

single_header/catch/fakeit.hpp

Lines changed: 24 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
* FakeIt - A Simplified C++ Mocking Framework
44
* Copyright (c) Eran Pe'er 2013
5-
* Generated: 2022-05-22 19:04:09.009371
5+
* Generated: 2022-06-12 10:26:05.045098
66
* Distributed under the MIT License. Please refer to the LICENSE file at:
77
* https://github.com/eranpeer/FakeIt
88
*/
@@ -1139,74 +1139,23 @@ namespace fakeit {
11391139
}
11401140

11411141
}
1142-
#if __has_include("catch2/catch.hpp")
1143-
# include <catch2/catch.hpp>
1144-
#elif __has_include("catch2/catch_all.hpp")
1145-
# include <catch2/catch_assertion_result.hpp>
1146-
# include <catch2/catch_test_macros.hpp>
1147-
#elif __has_include("catch_amalgamated.hpp")
1148-
# include <catch_amalgamated.hpp>
1142+
#if defined __has_include
1143+
# if __has_include("catch2/catch.hpp")
1144+
# include <catch2/catch.hpp>
1145+
# elif __has_include("catch2/catch_all.hpp")
1146+
# include <catch2/catch_assertion_result.hpp>
1147+
# include <catch2/catch_test_macros.hpp>
1148+
# elif __has_include("catch_amalgamated.hpp")
1149+
# include <catch_amalgamated.hpp>
1150+
# else
1151+
# include <catch.hpp>
1152+
# endif
11491153
#else
1150-
# include <catch.hpp>
1154+
# include <catch2/catch.hpp>
11511155
#endif
11521156

11531157
namespace fakeit {
11541158

1155-
struct VerificationException : public FakeitException {
1156-
virtual ~VerificationException() = default;
1157-
1158-
void setFileInfo(const char *file, int line, const char *callingMethod) {
1159-
_file = file;
1160-
_callingMethod = callingMethod;
1161-
_line = line;
1162-
}
1163-
1164-
const char *file() const {
1165-
return _file;
1166-
}
1167-
1168-
int line() const {
1169-
return _line;
1170-
}
1171-
1172-
const char *callingMethod() const {
1173-
return _callingMethod;
1174-
}
1175-
1176-
private:
1177-
const char *_file;
1178-
int _line;
1179-
const char *_callingMethod;
1180-
};
1181-
1182-
struct NoMoreInvocationsVerificationException : public VerificationException {
1183-
1184-
NoMoreInvocationsVerificationException(std::string format) :
1185-
_format(format) {
1186-
}
1187-
1188-
virtual std::string what() const override {
1189-
return _format;
1190-
}
1191-
1192-
private:
1193-
std::string _format;
1194-
};
1195-
1196-
struct SequenceVerificationException : public VerificationException {
1197-
SequenceVerificationException(const std::string &format) :
1198-
_format(format)
1199-
{
1200-
}
1201-
1202-
virtual std::string what() const override {
1203-
return _format;
1204-
}
1205-
1206-
private:
1207-
std::string _format;
1208-
};
1209-
12101159
class CatchAdapter : public EventHandler {
12111160
EventFormatter &_formatter;
12121161

@@ -6461,6 +6410,7 @@ namespace fakeit {
64616410
};
64626411

64636412
}
6413+
#include <cmath>
64646414
#include <cstring>
64656415

64666416

@@ -7866,7 +7816,7 @@ namespace fakeit {
78667816
template <typename T, int N>
78677817
struct ArgValue
78687818
{
7869-
ArgValue(T &&v): value { std::forward<T>(v) } {}
7819+
ArgValue(T &&v): value ( std::forward<T>(v) ) {}
78707820
constexpr static int pos = N;
78717821
T value;
78727822
};
@@ -8159,6 +8109,12 @@ namespace fakeit {
81598109
template<std::size_t N>
81608110
using NakedArgType = typename naked_type<ArgType<index>>::type;
81618111

8112+
template <typename MatcherCreatorT, typename = void>
8113+
struct IsMatcherCreatorTypeCompatible : std::false_type {};
8114+
8115+
template <typename MatcherCreatorT>
8116+
struct IsMatcherCreatorTypeCompatible<MatcherCreatorT, typename std::enable_if<MatcherCreatorT::template IsTypeCompatible<NakedArgType<index>>::value, void>::type> : std::true_type {};
8117+
81628118
MatchersCollector(std::vector<Destructible *> &matchers)
81638119
: _matchers(matchers) {
81648120
}
@@ -8168,6 +8124,8 @@ namespace fakeit {
81688124

81698125
template<typename Head>
81708126
typename std::enable_if<
8127+
!std::is_same<AnyMatcher, typename naked_type<Head>::type>::value &&
8128+
!IsMatcherCreatorTypeCompatible<typename naked_type<Head>::type>::value &&
81718129
std::is_constructible<NakedArgType<index>, Head&&>::value, void>
81728130
::type CollectMatchers(Head &&value) {
81738131

@@ -8177,7 +8135,7 @@ namespace fakeit {
81778135

81788136
template<typename Head>
81798137
typename std::enable_if<
8180-
naked_type<Head>::type::template IsTypeCompatible<NakedArgType<index>>::value, void>
8138+
IsMatcherCreatorTypeCompatible<typename naked_type<Head>::type>::value, void>
81818139
::type CollectMatchers(Head &&creator) {
81828140
TypedMatcher<NakedArgType<index>> *d = creator.template createMatcher<NakedArgType<index>>();
81838141
_matchers.push_back(d);

single_header/cute/fakeit.hpp

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
* FakeIt - A Simplified C++ Mocking Framework
44
* Copyright (c) Eran Pe'er 2013
5-
* Generated: 2022-05-22 19:04:09.306216
5+
* Generated: 2022-06-12 10:26:05.339719
66
* Distributed under the MIT License. Please refer to the LICENSE file at:
77
* https://github.com/eranpeer/FakeIt
88
*/
@@ -6337,6 +6337,7 @@ namespace fakeit {
63376337
};
63386338

63396339
}
6340+
#include <cmath>
63406341
#include <cstring>
63416342

63426343

@@ -7742,7 +7743,7 @@ namespace fakeit {
77427743
template <typename T, int N>
77437744
struct ArgValue
77447745
{
7745-
ArgValue(T &&v): value { std::forward<T>(v) } {}
7746+
ArgValue(T &&v): value ( std::forward<T>(v) ) {}
77467747
constexpr static int pos = N;
77477748
T value;
77487749
};
@@ -8035,6 +8036,12 @@ namespace fakeit {
80358036
template<std::size_t N>
80368037
using NakedArgType = typename naked_type<ArgType<index>>::type;
80378038

8039+
template <typename MatcherCreatorT, typename = void>
8040+
struct IsMatcherCreatorTypeCompatible : std::false_type {};
8041+
8042+
template <typename MatcherCreatorT>
8043+
struct IsMatcherCreatorTypeCompatible<MatcherCreatorT, typename std::enable_if<MatcherCreatorT::template IsTypeCompatible<NakedArgType<index>>::value, void>::type> : std::true_type {};
8044+
80388045
MatchersCollector(std::vector<Destructible *> &matchers)
80398046
: _matchers(matchers) {
80408047
}
@@ -8044,6 +8051,8 @@ namespace fakeit {
80448051

80458052
template<typename Head>
80468053
typename std::enable_if<
8054+
!std::is_same<AnyMatcher, typename naked_type<Head>::type>::value &&
8055+
!IsMatcherCreatorTypeCompatible<typename naked_type<Head>::type>::value &&
80478056
std::is_constructible<NakedArgType<index>, Head&&>::value, void>
80488057
::type CollectMatchers(Head &&value) {
80498058

@@ -8053,7 +8062,7 @@ namespace fakeit {
80538062

80548063
template<typename Head>
80558064
typename std::enable_if<
8056-
naked_type<Head>::type::template IsTypeCompatible<NakedArgType<index>>::value, void>
8065+
IsMatcherCreatorTypeCompatible<typename naked_type<Head>::type>::value, void>
80578066
::type CollectMatchers(Head &&creator) {
80588067
TypedMatcher<NakedArgType<index>> *d = creator.template createMatcher<NakedArgType<index>>();
80598068
_matchers.push_back(d);

0 commit comments

Comments
 (0)