Skip to content

Commit 49b27fe

Browse files
committed
Merge branch 'dev-2.3.1'
2 parents 78ca536 + 1154378 commit 49b27fe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1559
-1027
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Debug/
3232
ipch/
3333
TestResults/
3434
tests/cmake-build-debug/
35+
tests/x64/
3536
*/.vs/
3637

3738
# Eclipse
@@ -59,3 +60,4 @@ bii/
5960

6061
*.*~
6162
*.nupkg
63+

appveyor.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1+
image:
2+
- Visual Studio 2019
3+
- Visual Studio 2015
4+
5+
configuration:
6+
- Debug
7+
- Release
8+
19
build:
210
project: tests\all_tests.sln

build/sources.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ CPP_SRCS += \
1111
gcc_stubbing_multiple_values_tests.cpp \
1212
gcc_type_info_tests.cpp \
1313
miscellaneous_tests.cpp \
14+
move_only_return_tests.cpp \
1415
msc_stubbing_multiple_values_tests.cpp \
1516
msc_type_info_tests.cpp \
1617
overloadded_methods_tests.cpp \

config/standalone/StandaloneFakeit.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
namespace fakeit {
77

88
struct VerificationException : public std::exception {
9-
virtual ~VerificationException() NO_THROWS{};
9+
virtual ~VerificationException() FAKEIT_NO_THROWS{};
1010

1111
VerificationException(std::string format) : //
1212
_format(format) { //
@@ -33,7 +33,7 @@ namespace fakeit {
3333
return _callingMethod;
3434
}
3535

36-
const char* what() const NO_THROWS override{
36+
const char* what() const FAKEIT_NO_THROWS override{
3737
return _format.c_str();
3838
}
3939
private:

config/tpunit/TpUnitFakeit.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ class TpUnitAdapter: public EventHandler {
2727
: _msg(msg) {
2828
}
2929

30-
const char* what() const NO_THROWS override{
30+
const char* what() const FAKEIT_NO_THROWS override{
3131
return _msg.c_str();
3232
}
3333

34-
virtual ~AssertionException() NO_THROWS {}
34+
virtual ~AssertionException() FAKEIT_NO_THROWS {}
3535
};
3636

3737
virtual ~TpUnitAdapter() = default;

include/fakeit/ActionSequence.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ namespace fakeit {
4444
Action<R, arglist...> &action = dynamic_cast<Action<R, arglist...> &>(destructable);
4545
std::function<void()> finallyClause = [&]() -> void {
4646
if (action.isDone())
47+
{
4748
_recordedActions.erase(_recordedActions.begin());
49+
_usedActions.push_back(destructablePtr);
50+
}
4851
};
4952
Finally onExit(finallyClause);
5053
return action.invoke(args);
@@ -76,11 +79,13 @@ namespace fakeit {
7679

7780
void clear() {
7881
_recordedActions.clear();
82+
_usedActions.clear();
7983
auto actionPtr = std::shared_ptr<Destructible> {new NoMoreRecordedAction()};
8084
_recordedActions.push_back(actionPtr);
8185
}
8286

8387
std::vector<std::shared_ptr<Destructible>> _recordedActions;
88+
std::vector<std::shared_ptr<Destructible>> _usedActions;
8489
};
8590

8691
}

include/fakeit/ActualInvocationsSource.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ namespace fakeit {
1010
struct ActualInvocationsContainer {
1111
virtual void clear() = 0;
1212

13-
virtual ~ActualInvocationsContainer() NO_THROWS { }
13+
virtual ~ActualInvocationsContainer() FAKEIT_NO_THROWS { }
1414
};
1515

1616
struct ActualInvocationsSource {
1717
virtual void getActualInvocations(std::unordered_set<fakeit::Invocation *> &into) const = 0;
1818

19-
virtual ~ActualInvocationsSource() NO_THROWS { }
19+
virtual ~ActualInvocationsSource() FAKEIT_NO_THROWS { }
2020
};
2121

2222
struct InvocationsSourceProxy : public ActualInvocationsSource {

include/fakeit/DomainObjects.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ namespace fakeit {
1515

1616
template<typename C>
1717
struct MockObject {
18-
virtual ~MockObject() THROWS { };
18+
virtual ~MockObject() FAKEIT_THROWS { };
1919

2020
virtual C &get() = 0;
2121

include/fakeit/Invocation.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ namespace fakeit {
2727

2828
struct Matcher {
2929

30-
virtual ~Matcher() THROWS {
30+
virtual ~Matcher() FAKEIT_THROWS {
3131
}
3232

3333
virtual bool matches(Invocation &invocation) = 0;

include/fakeit/MethodMockingContext.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ namespace fakeit {
182182
: _impl(std::move(other._impl)) {
183183
}
184184

185-
virtual ~MethodMockingContext() NO_THROWS { }
185+
virtual ~MethodMockingContext() FAKEIT_NO_THROWS { }
186186

187187
std::string format() const override {
188188
return _impl->format();

0 commit comments

Comments
 (0)