I've been waiting for this feature for quite a while now, but the original issue #667 has been closed recently due to inactivity. Given the fact that googletest will drop support for c++98 soon, I'd expect that a language feature like noexcept should be supported.
I am also in need of this, especially now that noexcept is part of the type system and compilers are starting to flag noexcept mismatches as errors.
Thank you very much for this report. The best way to approach this would be to create a proper PR and submit it for consideration.
@ugoren ping
"noexcept" is supported in the latest gmock, or not?
I don't know since when, but it works now. Syntax is described here and all you need to do is to change
MOCK_METHOD(int, GetSize, (), (const, override)); // override is optional
to
MOCK_METHOD(int, GetSize, (), (const, override, noexcept)); // override is optional
Please, close this issue.
Most helpful comment
I am also in need of this, especially now that noexcept is part of the type system and compilers are starting to flag noexcept mismatches as errors.