开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜