Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion include/fakeit/StubbingProgress.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ namespace fakeit {
template<typename current_arg, typename ... valuelist, typename ... arglist>
static void
Assign(ArgumentsTuple<valuelist...> arg_vals, current_arg &&p, arglist&&... args) {
ParamWalker<N - 1>::template Assign(arg_vals, std::forward<arglist>(args)...);
ParamWalker<N - 1>::Assign(arg_vals, std::forward<arglist>(args)...);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is applying from the previous fix that was directly to standalone:
6b685cb

GetArg(std::forward<current_arg>(p)) = std::get<sizeof...(valuelist) - N>(arg_vals);
}
};
Expand Down
4 changes: 2 additions & 2 deletions include/mockutils/mscpp/VirtualTable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ namespace fakeit {
C &cRef = *c;
auto vt = VirtualTable<C, baseclasses...>::getVTable(cRef);
void *dtorPtr = vt.getCookie(dtorCookieIndex);
void(*method)(C *) = reinterpret_cast<void (*)(C *)>(dtorPtr);
method(c);
void(C::*method)() = union_cast<void(C::*)()>(dtorPtr);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the source of the fix, which then gets copied into all the single headers by generate_fakeit_single_header.py --all

(cRef.*method)();
return 0;
}

Expand Down
8 changes: 4 additions & 4 deletions single_header/boost/fakeit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* FakeIt - A Simplified C++ Mocking Framework
* Copyright (c) Eran Pe'er 2013
* Generated: 2023-07-08 18:53:41.524047
* Generated: 2025-10-15 20:40:54.910611
* Distributed under the MIT License. Please refer to the LICENSE file at:
* https://github.com/eranpeer/FakeIt
*/
Expand Down Expand Up @@ -5556,8 +5556,8 @@ namespace fakeit {
C &cRef = *c;
auto vt = VirtualTable<C, baseclasses...>::getVTable(cRef);
void *dtorPtr = vt.getCookie(dtorCookieIndex);
void(*method)(C *) = reinterpret_cast<void (*)(C *)>(dtorPtr);
method(c);
void(C::*method)() = union_cast<void(C::*)()>(dtorPtr);
(cRef.*method)();
return 0;
}

Expand Down Expand Up @@ -7851,7 +7851,7 @@ namespace fakeit {
template<typename current_arg, typename ... valuelist, typename ... arglist>
static void
Assign(ArgumentsTuple<valuelist...> arg_vals, current_arg &&p, arglist&&... args) {
ParamWalker<N - 1>::template Assign(arg_vals, std::forward<arglist>(args)...);
ParamWalker<N - 1>::Assign(arg_vals, std::forward<arglist>(args)...);
GetArg(std::forward<current_arg>(p)) = std::get<sizeof...(valuelist) - N>(arg_vals);
}
};
Expand Down
8 changes: 4 additions & 4 deletions single_header/catch/fakeit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* FakeIt - A Simplified C++ Mocking Framework
* Copyright (c) Eran Pe'er 2013
* Generated: 2023-07-08 18:53:41.573198
* Generated: 2025-10-15 20:40:54.946323
* Distributed under the MIT License. Please refer to the LICENSE file at:
* https://github.com/eranpeer/FakeIt
*/
Expand Down Expand Up @@ -5594,8 +5594,8 @@ namespace fakeit {
C &cRef = *c;
auto vt = VirtualTable<C, baseclasses...>::getVTable(cRef);
void *dtorPtr = vt.getCookie(dtorCookieIndex);
void(*method)(C *) = reinterpret_cast<void (*)(C *)>(dtorPtr);
method(c);
void(C::*method)() = union_cast<void(C::*)()>(dtorPtr);
(cRef.*method)();
return 0;
}

Expand Down Expand Up @@ -7889,7 +7889,7 @@ namespace fakeit {
template<typename current_arg, typename ... valuelist, typename ... arglist>
static void
Assign(ArgumentsTuple<valuelist...> arg_vals, current_arg &&p, arglist&&... args) {
ParamWalker<N - 1>::template Assign(arg_vals, std::forward<arglist>(args)...);
ParamWalker<N - 1>::Assign(arg_vals, std::forward<arglist>(args)...);
GetArg(std::forward<current_arg>(p)) = std::get<sizeof...(valuelist) - N>(arg_vals);
}
};
Expand Down
8 changes: 4 additions & 4 deletions single_header/cute/fakeit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* FakeIt - A Simplified C++ Mocking Framework
* Copyright (c) Eran Pe'er 2013
* Generated: 2023-07-08 18:53:41.621542
* Generated: 2025-10-15 20:40:54.994182
* Distributed under the MIT License. Please refer to the LICENSE file at:
* https://github.com/eranpeer/FakeIt
*/
Expand Down Expand Up @@ -5521,8 +5521,8 @@ namespace fakeit {
C &cRef = *c;
auto vt = VirtualTable<C, baseclasses...>::getVTable(cRef);
void *dtorPtr = vt.getCookie(dtorCookieIndex);
void(*method)(C *) = reinterpret_cast<void (*)(C *)>(dtorPtr);
method(c);
void(C::*method)() = union_cast<void(C::*)()>(dtorPtr);
(cRef.*method)();
return 0;
}

Expand Down Expand Up @@ -7816,7 +7816,7 @@ namespace fakeit {
template<typename current_arg, typename ... valuelist, typename ... arglist>
static void
Assign(ArgumentsTuple<valuelist...> arg_vals, current_arg &&p, arglist&&... args) {
ParamWalker<N - 1>::template Assign(arg_vals, std::forward<arglist>(args)...);
ParamWalker<N - 1>::Assign(arg_vals, std::forward<arglist>(args)...);
GetArg(std::forward<current_arg>(p)) = std::get<sizeof...(valuelist) - N>(arg_vals);
}
};
Expand Down
8 changes: 4 additions & 4 deletions single_header/doctest/fakeit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* FakeIt - A Simplified C++ Mocking Framework
* Copyright (c) Eran Pe'er 2013
* Generated: 2023-07-08 18:53:41.670237
* Generated: 2025-10-15 20:40:55.041783
* Distributed under the MIT License. Please refer to the LICENSE file at:
* https://github.com/eranpeer/FakeIt
*/
Expand Down Expand Up @@ -5549,8 +5549,8 @@ namespace fakeit {
C &cRef = *c;
auto vt = VirtualTable<C, baseclasses...>::getVTable(cRef);
void *dtorPtr = vt.getCookie(dtorCookieIndex);
void(*method)(C *) = reinterpret_cast<void (*)(C *)>(dtorPtr);
method(c);
void(C::*method)() = union_cast<void(C::*)()>(dtorPtr);
(cRef.*method)();
return 0;
}

Expand Down Expand Up @@ -7844,7 +7844,7 @@ namespace fakeit {
template<typename current_arg, typename ... valuelist, typename ... arglist>
static void
Assign(ArgumentsTuple<valuelist...> arg_vals, current_arg &&p, arglist&&... args) {
ParamWalker<N - 1>::template Assign(arg_vals, std::forward<arglist>(args)...);
ParamWalker<N - 1>::Assign(arg_vals, std::forward<arglist>(args)...);
GetArg(std::forward<current_arg>(p)) = std::get<sizeof...(valuelist) - N>(arg_vals);
}
};
Expand Down
8 changes: 4 additions & 4 deletions single_header/gtest/fakeit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* FakeIt - A Simplified C++ Mocking Framework
* Copyright (c) Eran Pe'er 2013
* Generated: 2023-07-08 18:53:41.718989
* Generated: 2025-10-15 20:40:55.079306
* Distributed under the MIT License. Please refer to the LICENSE file at:
* https://github.com/eranpeer/FakeIt
*/
Expand Down Expand Up @@ -5521,8 +5521,8 @@ namespace fakeit {
C &cRef = *c;
auto vt = VirtualTable<C, baseclasses...>::getVTable(cRef);
void *dtorPtr = vt.getCookie(dtorCookieIndex);
void(*method)(C *) = reinterpret_cast<void (*)(C *)>(dtorPtr);
method(c);
void(C::*method)() = union_cast<void(C::*)()>(dtorPtr);
(cRef.*method)();
return 0;
}

Expand Down Expand Up @@ -7816,7 +7816,7 @@ namespace fakeit {
template<typename current_arg, typename ... valuelist, typename ... arglist>
static void
Assign(ArgumentsTuple<valuelist...> arg_vals, current_arg &&p, arglist&&... args) {
ParamWalker<N - 1>::template Assign(arg_vals, std::forward<arglist>(args)...);
ParamWalker<N - 1>::Assign(arg_vals, std::forward<arglist>(args)...);
GetArg(std::forward<current_arg>(p)) = std::get<sizeof...(valuelist) - N>(arg_vals);
}
};
Expand Down
8 changes: 4 additions & 4 deletions single_header/mettle/fakeit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* FakeIt - A Simplified C++ Mocking Framework
* Copyright (c) Eran Pe'er 2013
* Generated: 2023-07-08 18:53:41.768014
* Generated: 2025-10-15 20:40:55.121053
* Distributed under the MIT License. Please refer to the LICENSE file at:
* https://github.com/eranpeer/FakeIt
*/
Expand Down Expand Up @@ -5543,8 +5543,8 @@ namespace fakeit {
C &cRef = *c;
auto vt = VirtualTable<C, baseclasses...>::getVTable(cRef);
void *dtorPtr = vt.getCookie(dtorCookieIndex);
void(*method)(C *) = reinterpret_cast<void (*)(C *)>(dtorPtr);
method(c);
void(C::*method)() = union_cast<void(C::*)()>(dtorPtr);
(cRef.*method)();
return 0;
}

Expand Down Expand Up @@ -7838,7 +7838,7 @@ namespace fakeit {
template<typename current_arg, typename ... valuelist, typename ... arglist>
static void
Assign(ArgumentsTuple<valuelist...> arg_vals, current_arg &&p, arglist&&... args) {
ParamWalker<N - 1>::template Assign(arg_vals, std::forward<arglist>(args)...);
ParamWalker<N - 1>::Assign(arg_vals, std::forward<arglist>(args)...);
GetArg(std::forward<current_arg>(p)) = std::get<sizeof...(valuelist) - N>(arg_vals);
}
};
Expand Down
8 changes: 4 additions & 4 deletions single_header/mstest/fakeit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* FakeIt - A Simplified C++ Mocking Framework
* Copyright (c) Eran Pe'er 2013
* Generated: 2023-07-08 18:53:41.817043
* Generated: 2025-10-15 20:40:55.169261
* Distributed under the MIT License. Please refer to the LICENSE file at:
* https://github.com/eranpeer/FakeIt
*/
Expand Down Expand Up @@ -5545,8 +5545,8 @@ namespace fakeit {
C &cRef = *c;
auto vt = VirtualTable<C, baseclasses...>::getVTable(cRef);
void *dtorPtr = vt.getCookie(dtorCookieIndex);
void(*method)(C *) = reinterpret_cast<void (*)(C *)>(dtorPtr);
method(c);
void(C::*method)() = union_cast<void(C::*)()>(dtorPtr);
(cRef.*method)();
return 0;
}

Expand Down Expand Up @@ -7840,7 +7840,7 @@ namespace fakeit {
template<typename current_arg, typename ... valuelist, typename ... arglist>
static void
Assign(ArgumentsTuple<valuelist...> arg_vals, current_arg &&p, arglist&&... args) {
ParamWalker<N - 1>::template Assign(arg_vals, std::forward<arglist>(args)...);
ParamWalker<N - 1>::Assign(arg_vals, std::forward<arglist>(args)...);
GetArg(std::forward<current_arg>(p)) = std::get<sizeof...(valuelist) - N>(arg_vals);
}
};
Expand Down
8 changes: 4 additions & 4 deletions single_header/nunit/fakeit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* FakeIt - A Simplified C++ Mocking Framework
* Copyright (c) Eran Pe'er 2013
* Generated: 2023-07-08 18:53:41.866779
* Generated: 2025-10-15 20:40:55.200480
* Distributed under the MIT License. Please refer to the LICENSE file at:
* https://github.com/eranpeer/FakeIt
*/
Expand Down Expand Up @@ -5528,8 +5528,8 @@ namespace fakeit {
C &cRef = *c;
auto vt = VirtualTable<C, baseclasses...>::getVTable(cRef);
void *dtorPtr = vt.getCookie(dtorCookieIndex);
void(*method)(C *) = reinterpret_cast<void (*)(C *)>(dtorPtr);
method(c);
void(C::*method)() = union_cast<void(C::*)()>(dtorPtr);
(cRef.*method)();
return 0;
}

Expand Down Expand Up @@ -7823,7 +7823,7 @@ namespace fakeit {
template<typename current_arg, typename ... valuelist, typename ... arglist>
static void
Assign(ArgumentsTuple<valuelist...> arg_vals, current_arg &&p, arglist&&... args) {
ParamWalker<N - 1>::template Assign(arg_vals, std::forward<arglist>(args)...);
ParamWalker<N - 1>::Assign(arg_vals, std::forward<arglist>(args)...);
GetArg(std::forward<current_arg>(p)) = std::get<sizeof...(valuelist) - N>(arg_vals);
}
};
Expand Down
8 changes: 4 additions & 4 deletions single_header/qtest/fakeit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* FakeIt - A Simplified C++ Mocking Framework
* Copyright (c) Eran Pe'er 2013
* Generated: 2023-07-08 18:53:41.915517
* Generated: 2025-10-15 20:40:55.248030
* Distributed under the MIT License. Please refer to the LICENSE file at:
* https://github.com/eranpeer/FakeIt
*/
Expand Down Expand Up @@ -5529,8 +5529,8 @@ namespace fakeit {
C &cRef = *c;
auto vt = VirtualTable<C, baseclasses...>::getVTable(cRef);
void *dtorPtr = vt.getCookie(dtorCookieIndex);
void(*method)(C *) = reinterpret_cast<void (*)(C *)>(dtorPtr);
method(c);
void(C::*method)() = union_cast<void(C::*)()>(dtorPtr);
(cRef.*method)();
return 0;
}

Expand Down Expand Up @@ -7824,7 +7824,7 @@ namespace fakeit {
template<typename current_arg, typename ... valuelist, typename ... arglist>
static void
Assign(ArgumentsTuple<valuelist...> arg_vals, current_arg &&p, arglist&&... args) {
ParamWalker<N - 1>::template Assign(arg_vals, std::forward<arglist>(args)...);
ParamWalker<N - 1>::Assign(arg_vals, std::forward<arglist>(args)...);
GetArg(std::forward<current_arg>(p)) = std::get<sizeof...(valuelist) - N>(arg_vals);
}
};
Expand Down
6 changes: 3 additions & 3 deletions single_header/standalone/fakeit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* FakeIt - A Simplified C++ Mocking Framework
* Copyright (c) Eran Pe'er 2013
* Generated: 2023-07-08 18:53:41.964544
* Generated: 2025-10-15 20:40:55.295920
* Distributed under the MIT License. Please refer to the LICENSE file at:
* https://github.com/eranpeer/FakeIt
*/
Expand Down Expand Up @@ -5597,8 +5597,8 @@ namespace fakeit {
C &cRef = *c;
auto vt = VirtualTable<C, baseclasses...>::getVTable(cRef);
void *dtorPtr = vt.getCookie(dtorCookieIndex);
void(*method)(C *) = reinterpret_cast<void (*)(C *)>(dtorPtr);
method(c);
void(C::*method)() = union_cast<void(C::*)()>(dtorPtr);
(cRef.*method)();
return 0;
}

Expand Down
8 changes: 4 additions & 4 deletions single_header/tpunit/fakeit.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/*
* FakeIt - A Simplified C++ Mocking Framework
* Copyright (c) Eran Pe'er 2013
* Generated: 2023-07-08 18:53:42.013668
* Generated: 2025-10-15 20:40:55.329457
* Distributed under the MIT License. Please refer to the LICENSE file at:
* https://github.com/eranpeer/FakeIt
*/
Expand Down Expand Up @@ -5568,8 +5568,8 @@ namespace fakeit {
C &cRef = *c;
auto vt = VirtualTable<C, baseclasses...>::getVTable(cRef);
void *dtorPtr = vt.getCookie(dtorCookieIndex);
void(*method)(C *) = reinterpret_cast<void (*)(C *)>(dtorPtr);
method(c);
void(C::*method)() = union_cast<void(C::*)()>(dtorPtr);
(cRef.*method)();
return 0;
}

Expand Down Expand Up @@ -7863,7 +7863,7 @@ namespace fakeit {
template<typename current_arg, typename ... valuelist, typename ... arglist>
static void
Assign(ArgumentsTuple<valuelist...> arg_vals, current_arg &&p, arglist&&... args) {
ParamWalker<N - 1>::template Assign(arg_vals, std::forward<arglist>(args)...);
ParamWalker<N - 1>::Assign(arg_vals, std::forward<arglist>(args)...);
GetArg(std::forward<current_arg>(p)) = std::get<sizeof...(valuelist) - N>(arg_vals);
}
};
Expand Down
Loading