diff options
author | vladlosev <vladlosev@8415998a-534a-0410-bf83-d39667b30386> | 2010-05-13 18:16:03 +0000 |
---|---|---|
committer | vladlosev <vladlosev@8415998a-534a-0410-bf83-d39667b30386> | 2010-05-13 18:16:03 +0000 |
commit | e2e8ba401d198d1a8304c652e997505609b62696 (patch) | |
tree | 9e63b75d2c7ca8d342e9c1dceab84c360eaa5ef2 /include/gmock/gmock-more-actions.h | |
parent | 02f7106557fde1f1075dc53d65ef1f7a11851f93 (diff) | |
download | googletest-e2e8ba401d198d1a8304c652e997505609b62696.tar.gz googletest-e2e8ba401d198d1a8304c652e997505609b62696.tar.bz2 googletest-e2e8ba401d198d1a8304c652e997505609b62696.zip |
Renames test script flags.
Diffstat (limited to 'include/gmock/gmock-more-actions.h')
-rw-r--r-- | include/gmock/gmock-more-actions.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/gmock/gmock-more-actions.h b/include/gmock/gmock-more-actions.h index 9a6fe969..6d686cd1 100644 --- a/include/gmock/gmock-more-actions.h +++ b/include/gmock/gmock-more-actions.h @@ -198,7 +198,17 @@ ACTION_TEMPLATE(DeleteArg, // Action Throw(exception) can be used in a mock function of any type // to throw the given exception. Any copyable value can be thrown. #if GTEST_HAS_EXCEPTIONS + +// Suppresses the 'unreachable code' warning that VC generates in opt modes. +#ifdef _MSC_VER +#pragma warning(push) // Saves the current warning state. +#pragma warning(disable:4702) // Temporarily disables warning 4702. +#endif ACTION_P(Throw, exception) { throw exception; } +#ifdef _MSC_VER +#pragma warning(pop) // Restores the warning state. +#endif + #endif // GTEST_HAS_EXCEPTIONS #ifdef _MSC_VER |