Michael Kebe
unread,Mar 21, 2012, 4:46:53 AM3/21/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Google C++ Testing Framework
There is no easy way to test that a string contains a substring.
I found ::testing::IsSubstring, but it should not directly called
(comment in gtest.h).
What do you think about adding two macros like this:
#define ASSERT_SUBSTR(needle, haystack)\
ASSERT_PRED_FORMAT2(::testing::IsSubstring, needle, haystack)
#define ASSERT_NSUBSTR(needle, haystack)\
ASSERT_PRED_FORMAT2(::testing::IsNotSubstring, needle, haystack)
Greetings
Michael