Commit a3c7ccef authored by Yedidya Feldblum's avatar Yedidya Feldblum Committed by Facebook GitHub Bot

tweak try_and_catch test for windows

Summary: Tweak a test that relies on hardcoding the expected result of `std::exception().what()` instead to call that and use the result without hardcoding it.

Differential Revision: D26573226

fbshipit-source-id: 3802d12186c96b864e2680d99f5cfca185235f8d
parent 9e8bcdc8
...@@ -141,7 +141,7 @@ TEST(ExceptionWrapper, try_and_catch_test) { ...@@ -141,7 +141,7 @@ TEST(ExceptionWrapper, try_and_catch_test) {
auto ew3 = try_and_catch<std::exception, std::runtime_error>( auto ew3 = try_and_catch<std::exception, std::runtime_error>(
[]() { throw std::exception(); }); []() { throw std::exception(); });
EXPECT_TRUE(bool(ew3)); EXPECT_TRUE(bool(ew3));
EXPECT_EQ(ew3.what(), kExceptionClassName + ": std::exception"); EXPECT_EQ(ew3.what(), kExceptionClassName + ": " + std::exception().what());
EXPECT_EQ(ew3.class_name(), kExceptionClassName); EXPECT_EQ(ew3.class_name(), kExceptionClassName);
rep = ew3.is_compatible_with<std::runtime_error>(); rep = ew3.is_compatible_with<std::runtime_error>();
EXPECT_FALSE(rep); EXPECT_FALSE(rep);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment