Commit 3b3fa008 authored by Peter Griess's avatar Peter Griess

Change ScopeGuardTest to work around libc++'s different terminate() semantics.

Summary:
- Looks like the default terminate() in libc++ doesn't reflect the
exception message to stderr. Instead, it just writes a generic
message. Reflect that in the test.

Test Plan:
- fbconfig -r folly && fbmake runtests
- ./configure && make check on Ubuntu/FC/Mac

Reviewed By: andrei.alexandrescu@fb.com

FB internal diff: D998590
parent 01d9c7dd
...@@ -126,7 +126,12 @@ TEST(ScopeGuard, GuardException) { ...@@ -126,7 +126,12 @@ TEST(ScopeGuard, GuardException) {
throw std::runtime_error("destructors should never throw!"); throw std::runtime_error("destructors should never throw!");
}); });
}, },
"destructors should never throw"); #ifdef _LIBCPP_VERSION
"terminate called throwing an exception"
#else
"destructors should never throw"
#endif
);
} }
/** /**
......
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