Commit Graph
11 Commits
Author SHA1 Message Date
Vladimir Goncharov 7f1c8bb447 Remove ThrowsMessageHasSubstr and fix some nits after review 2020-08-03 23:47:57 +03:00
Vladimir Goncharov a899cecb11 Cleanup a bulky expression, document implementation details 2020-08-03 23:47:57 +03:00
Vladimir Goncharov 4ebbfea623 Fix build under msvc 2020-08-03 23:47:57 +03:00
Vladimir Goncharov c46bdea43a Update tests after changing an error message 2020-08-03 23:47:57 +03:00
Vladimir Goncharov 0a80845e73 Fix build under msvc 2020-08-03 23:47:57 +03:00
Vladimir Goncharov 92d0a6f7e2 Add a test to ensure that the Throws matcher only invokes its argument once. 2020-08-03 23:47:57 +03:00
Vladimir Goncharov 69c510fb51 Add a test for duplicate catch clauses in throw matchers, fix a couple of nitpicks. 2020-08-03 23:47:57 +03:00
Vladimir Goncharov 49d1201a7e Add missing documentation piece 2020-08-03 23:47:57 +03:00
Vladimir Goncharov 46734d9a66 Small improvements: code style and property name 2020-08-03 23:47:57 +03:00
Vladimir Goncharov 9ac4cd0f49 Add matchers for testing exception properties
This PR adds matchers that accept a callable and verify that when invoked, it throws an exception with the given type and properties.

Fixes #952
2020-08-03 23:47:57 +03:00
Vladimir Goncharov 0d2830b283 Make EXPECT_THROW and EXPECT_NO_THROW macros more informative
EXPECT_THROW and EXPECT_NO_THROW will now print exception type and message when an unexpected std::exception-derived error is thrown.

Fixes #2878
2020-06-20 11:45:45 +03:00