-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'remotes/origin/develop'
- Loading branch information
Showing
10 changed files
with
343 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Trompeloeil C++ mocking framework | ||
* | ||
* Copyright Björn Fahller 2018 | ||
* | ||
* Use, modification and distribution is subject to the | ||
* Boost Software License, Version 1.0. (See accompanying | ||
* file LICENSE_1_0.txt or copy at | ||
* http://www.boost.org/LICENSE_1_0.txt) | ||
* | ||
* Project home: https://github.com/rollbear/trompeloeil | ||
*/ | ||
|
||
//array parameter type decays to pointer type for ANY | ||
|
||
#include <trompeloeil.hpp> | ||
|
||
|
||
struct MS | ||
{ | ||
MAKE_MOCK1(f, void(int [3])); | ||
}; | ||
|
||
int main() | ||
{ | ||
MS obj; | ||
|
||
#if (TROMPELOEIL_CPLUSPLUS == 201103L) | ||
|
||
REQUIRE_CALL_V(obj, f(ANY(int[3]))); | ||
|
||
#else /* (TROMPELOEIL_CPLUSPLUS == 201103L) */ | ||
|
||
REQUIRE_CALL(obj, f(ANY(int[3]))); | ||
|
||
#endif /* !(TROMPELOEIL_CPLUSPLUS == 201103L) */ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Trompeloeil C++ mocking framework | ||
* | ||
* Copyright Björn Fahller 2019 | ||
* | ||
* Use, modification and distribution is subject to the | ||
* Boost Software License, Version 1.0. (See accompanying | ||
* file LICENSE_1_0.txt or copy at | ||
* http://www.boost.org/LICENSE_1_0.txt) | ||
* | ||
* Project home: https://github.com/rollbear/trompeloeil | ||
*/ | ||
|
||
// make a mock object movable, see: | ||
|
||
#include <trompeloeil.hpp> | ||
|
||
|
||
struct M | ||
{ | ||
MAKE_MOCK1(f, void(int)); | ||
}; | ||
|
||
template <typename T> | ||
T ident(T t) | ||
{ | ||
return t; | ||
} | ||
|
||
int main() | ||
{ | ||
auto obj = ident(M{}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.