Avoid:
> fatal: detected dubious ownership in repository at '/__w/turtle/turtle'
by adding that path to the git `safe.path`.
This is caused by the command(s) running inside the container but the
folder being created outside the container so the owner inside the container is not what is expected by git.
Without using a `std::string` the compiler may put the `const char*` C-Strings to the same memory address so our test might succeed when it should not.
Add a short descriptive comment and check the property where it is used.
The fixture is not really required and can be replaced by definitions in
each test which even improves readability.
Also the tests are partially redundant due to implicit conversions so
add test in test_function for actual usage testing of string comparisons.
Added runtime checks for C-style strings (char*) being nullptr during matching and serialization.
This fix prevents nullptr dereferences in the case that the null character pointer (as opposed to the null nullptr_t) is expected and in the case that a non-null string is expected but nullptr is actually passed.
Added unit tests for the cases of matching and serializing C-style strings (char*) that are nullptr.
(As of this revision, these new tests correctly fail, except for the test of mock::equal; fix to follow.)
Shortens the call sites a lot: `typename ref_arg<Ts>::type` -> `ref_arg_t<Ts>`
MSVC 2017 seems to have issues with std::conditional_t so use the C++11
variant here.
MSVC has issues with a tuple of references of incomplete classes and `virtual ~value() = default;`
Some compilers warn for constant expressions in the for-loop-condition
This allows support for any number of arguments and makes setting MOCK_MAX_ARGS unnecessary.
It also allows for easier debugging due to being able to step into actual code instead of preprocessor generated stuff
- Check callability of function.expect.with(...)
- Check serialization of MOCK_CONSTRAINT
- Actually test some variations of MOCK_CONSTRAINT usages
- Add more test for unique_ptr (move-only class)
- Remove redundant stuff from test_log and change a few values to catch mistakes
- Add test for *-matcher serialization
Combine result_type, function_arity, parameter_types into 1 trait.
This reduces the amount of template classes instantiated by a factor of 3 which should improve compile times and memory consumption.
Also improve tests and documentation of touched classes/traits.