Changelog History
Page 1
-
v2.5.0 Changes
November 14, 2025➕ Added
(Always)ReturnValCaptthat forces the capture of its parameter by value (even if the function returns a reference) and(Always)ReturnRefCaptthat forces the capture of its parameter by reference (even if the function returns a value). #280 #332 #356- DEPRECATION NOTICE: Previously, to replicate this functionality, some people used to provide explicit template parameters to
Returnfunctions, like.Return<std::string>(str)for a function returningconst std::string&. NowReturnValCaptcan be used instead, it is more explicit and safer, all usages of the previous (undocumented / unsupported) hack should be replaced by the new syntax. Same goes for.Return<std::string&>(str)that can now be replaced byReturnRefCapt. - (potentially) BREAKING: Disabled
(Always)Returntaking an rvalue-reference for functions returning a reference. Most often than not, this was the cause of dangling references. Now it prints a nice error message suggesting to use a safe alternative ((Always)ReturnValCapt).
- DEPRECATION NOTICE: Previously, to replicate this functionality, some people used to provide explicit template parameters to
🚚 Made
fakeit::Mockobjects move-constructible (and disabled the copy-constructor). #334🚚 Now objects passed by rvalue-reference to
.Return()will be moved, even if they are copyable (i.e.std::moveis respected). Before that, objects that were copyable were always copied, independent of how they were passed. #330🛠 Fixed a compile error on Clang 19. #350
➕ Added a macOS runner that tests the library with AppleClang in the CI. Also added a 64 bits MSVC job, but without RTTI-dependent tests, because RTTI-related features of FakeIt aren't supported in MSVC 64 bits. Plus some CI improvements. #319 #321 #333 #335 #352
➕ Added a tool to help create compilation speed benchmarks. #338
🛠 Fixed some warnings in the tests. #329
-
v2.4.1 Changes
October 06, 2024- 🛠 Fixed an incompatibility with recent versions of Catch2. #345
-
v2.4.0 Changes
April 17, 2023- 🔄 Changed the build system to CMake, added the necessary code to install the library with CMake. For more information, check the README. #192 #311 #315
- ➕ Added mocking of reference-qualified overloads through
RefOverloadedMethod,ConstRefOverloadedMethod,RValRefOverloadedMethod,ConstRValRefOverloadedMethod. #293 #309 #316 - 🛠 Fixed mocking of destructors in MSVC. #312
- 🛠 Fixed
Spy()in MSVC. #312 - 🛠 Fixed detection of the C++ standard in MSVC. #317
- 👌 Improved support of UndefinedBehaviorSanitizer / AddressSanitizer, the library should now be usable with these sanitizers enabled. #261 #318
- ➕ Added more installation instructions in the README. #291 #314
- 👌 Improved the CI to test the library with a lot more configurations. #313
-
v2.3.2 Changes
December 16, 2022- 🛠 Fixed an incompatibility with C++23 causing a compilation error #303
-
v2.3.1 Changes
December 02, 2022- 🤡 Automatically fake the destructor of mocks on MSVC, you no longer need to do it yourself. The behavior is now the same as for Clang / GCC #289
- 👍 Allow stubbing of functions with move-only return values #282
- 🤡 Extended lifetime of mock actions to fix some rare segfaults #301
- 🛠 Fixed a compilation error when trying to mock functions taking a vector of move-only objects #298
- 🛠 Fixed a compilation error when using
ReturnAndSetfor a type convertible but not assignable to the type of the parameter #295 - 🛠 Fixed name collision with macro for some template parameters #300
- 🛠 Fixed some compilation issues on MSVC #290
- 🛠 Fixed a rare compilation error #299
-
v2.3.0 Changes
June 12, 2022 -
v2.2.0 Changes
May 22, 2022- 💥 BREAKING : Changed
Spy()method to copy arguments instead of moving them. The goal is to be able to keep the value so they can beVerify()ed later. To forward them instead (for move-only types), you can useSpyWithoutVerify(), but then you won't be able to useVerify()on these methods #272 - ➕ Added an
ApproxEq()matcher, that match numeric values with some margin #271 - 🚚 Rewrote matcher code to be able to store a different type than the type that is checked, and to perfect-forward the value stored instead of always copying it. Fix object slicing and matching move-only types #268
- 🛠 Fixed mocking for some kind of functions (templated overloaded methods) #267
- 💥 BREAKING : Changed
-
v2.1.1 Changes
May 01, 2022- 🛠 Fix ReturnAndSet() compile error when using incompatible argument types #266
-
v2.1.0 Changes
March 13, 2022- ➕ Add ReturnAndSet() & AlwaysReturnAndSet() functions to assign output args #215
- ➕ Add Any verification specifier #247
- ➕ Added StrEq matcher and derivatives #256
- ➕ Add detection and support for Catch2 v3 #263
- 👌 Improve support for older versions of catch2
- 🛠 Fix warnings for GCC v11.1 and Clang v11.1 #246
-
v2.0.9 Changes
May 12, 2021- 🛠 Fix "unknown option" warning for GCC 7 and earlier.