diff options
Diffstat (limited to 'base/allocator/allocator_unittest.cc')
-rw-r--r-- | base/allocator/allocator_unittest.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/base/allocator/allocator_unittest.cc b/base/allocator/allocator_unittest.cc index eb20b38..a39b838 100644 --- a/base/allocator/allocator_unittest.cc +++ b/base/allocator/allocator_unittest.cc @@ -287,6 +287,13 @@ static void TestCalloc(size_t n, size_t s, bool ok) { } } +// MSVC C4530 complains about exception handler usage when exceptions are +// disabled. Temporarily disable that warning so we can test that they are, in +// fact, disabled. +#if defined(OS_WIN) +#pragma warning(push) +#pragma warning(disable: 4530) +#endif // A global test counter for number of times the NewHandler is called. static int news_handled = 0; @@ -331,6 +338,10 @@ static void TestNothrowNew(void* (*func)(size_t)) { std::set_new_handler(saved_handler); } +#if defined(OS_WIN) +#pragma warning(pop) +#endif + } // namespace //----------------------------------------------------------------------------- |