You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trompeloeil/ChangeLog

204 lines
5.7 KiB
Plaintext

v15 2016-04-29
* Fixed macro bug that caused warnings with g++ and clang++ when
compiling with strict C++ standards compliance.
v14 2016-04-27
* Fixed bug when the destruction of a sequence object with still
living expectations caused call to abort().
* You can now add extra trailing specifiers to a mock function,
such as the "override" context sensitive specifier, and/or the
keyword "noexcept" (careful with the latter if your registered
reporter can/does throw.)
Example:
struct D : public B {
MAKE_MOCK1(func, int(int), override);
};
v13 2016-03-07
* Mock functions and their expectations are thread safe, using
a global recursive mutex.
* Silenced warnings from g++ -Wshadow.
v12 2016-02-01
* Built in matchers are duck tuped by default, i.e. eq, ne, gt, ge,
lt, le do by default match any parameter that supports operators
==, !=, >, >=, <, <= with the value provided. If needed for
disambiguation of overloads an explicit type can be provided. Example:
REQUIRE_CALL(obj, numfunc(gt(3)));
REQUIRE_CALL(obj, strfunc(eq<std::string&>("foo")));
The expectation on numfunc will match a function numfunc with
any parameter type that can be compared as > 3. The expectation on
strfunc will only match an overload with std::string& (if there are
competing overloads, e.g. strfunc(const char*) and
strfunc(const std::string).)
* Fixed a bug with return type deduction where an array type expression
was used. E.g. returning a string literal when the return type was
const char* or std::string caused a compilation error.
* Fixed a bug when the eq(nullptr) matcher actually checked if !=
comparison with nullptr was allowed.
* Reluctantly reverted use of std::tuple_element_t<> for
typename tuppe_element<>::type, to support g++ 4.9.0 (4.9.1 does have
std::tuple_element_t<>.)
v11 2016-01-04
* Added regular expression matcher for std::string and c-strings
* Added specialization eq<nullptr> for pointer-like parameters and
pointer-to-member parameters. This is mostly useful for
pointer to pointer parameters, e.g.:
REQUIRE_CALL(obj, func(*trompeloeil::eq(nullptr)));
* Improved accuracy of compilation error message when attempting
to place expectation that does not uniquely match any function
signature.
* Added specialization eq<nullptr> for pointer-like parameters and
v10 2015-12-11
* Fixed bug when wildcard _ could not match std::ostream&
* Fixed ADL bugs
* Added functionality to use the dereference operator (prefix
operator*) on any matcher to instead match a pointer to the
value to check.
* Documented adapter for VisualStudio MSTest
* Corrected documentation bug for how to write report formatting
function trompeloeil::print<>(std::ostream&, T const&).
v9 2015-11-29
* Fixed bug with accepting std::unique_ptr<> by value.
* Signed/unsigned compilation warnings in expectations are attributed
to correct file/line with clang++ and VisualStudio 2015
* Complete documentation overhaul. Now with:
- Cook book
- FAQ
- reference manual
* Better compilation error message when illegal argument is
used in expectation.
* Addressed clang++ and VisualStudio warnings
v8 2015-10-30
* Fixed bug when mock object was destroyed with a saturated
expecation in scope.
* Further improved compilation error messages.
v7 2015-10-24
* Report error if live expectations remain when a mock object is
destroyed
* Reduced clutter in compilation errors
* Allow mock objects to be templates. E.g.
template <typename T>
struct mock
{
MAKE_MOCK1(func, void(T));
};
Note that member function templates are still not supported.
v6 2015-09-22
* Verified support for released Visual Studio 2015
* trompeloeil::ne(nullptr) works for all pointer types
* Fixed a few issues reported by clang 3.7 sanitizers
* line number in reporter_func is unsigned long to match
type of __LINE__
v5 2015-06-19
* Support for Visual Studio 2015 RC
* 5 parameter value matchers are included. These are
(in namespace trompeloeil):
- ne(x) - not equal to x
- lt(x) - less than x
- le(x) - less than or equal to x
- gt(x) - greater than x
- ge(x) - greater than or equal to x
These are used in expectations as e.g.:
REQUIRE_CALL(obj, foo(ne(5)));
which matches calls to foo with a value not equal to 5.
* Support and documentation for how to write custom matchers.
* The function registered to set_reporter() now must accept
the source location as file, line instead of location as
a combined string. Apologies for breaking existing code,
but since this is more in line with how other frame works
refers to source code locations, it improves compatibility.
v4 2015-05-01
* Expectations of death do not follow move-constructed and
copy-constructed deathwatched<T> objects.
* Internal rewrites to reduce compilation times
v3 2015-04-02
* Fixed compiler dependent reference binding SNAFU
v2 2015-04-02
* Improved compilation time performance. 20% drop in compilation time
has been seen in some test programs.
* Improved the compiler's chance to provide good warning messages
when values in expectations don't quite the types used in the
function signature (for example signed/unsigned mismatch.)
* Added support for tracing matching calls. This is an aid when
doing exploratory tests of legacy code. A trace can often
drastically reduce the time required to understand how the legacy
code works.
To use it, create an object of a tracer type, for example:
TEST(atest)
{
trompeloeil::stream_tracer trace(std::cout);
// normal test code
}
v1 2015-01-10
First official release.