Is there something similar to Igloo's LastException in GoogleTest?
I'm taking a look at TDD using GoogleTest and I was doing this kata: http://osherove.com/tdd-kata-1.
One of the steps is to throw an exception with a specific string. I know I can test for a thrown exception with ASSERT_THROW or EXPECT_THROW, but how can I test the exception message?
I've seen one of the solutions uses Igloo and its LastException, to 开发者_高级运维get the last exception thrown and check its contents.
Is there something similar in GoogleTest?
Nope, for more info check out ROS Wiki for what they've done to get around it.
精彩评论