Reputation: 63
Hi i want to catch a generic exception in function EXPECT_THROW GoogleTest ,which can catch all the type of exception thrown, irrespective of exception type.
Is their any similar way as we used to catch in try-catch block.
catch (...) {
}
Upvotes: 1
Views: 2870
Reputation: 38341
EXPECT_ANY_THROW
is for this purpose.
See Advanced googletest topics.
Upvotes: 2