10 #include <mimetic/utils.h>
16 class TEST_CLASS( test_find_bm )
20 const char* text, *pattern;
23 static const test_s test[];
25 void TEST_FUNCTION( find )
27 for(int i = 0; test[i].text != 0; ++i)
29 const char *bit, *eit, *exp, *got;
31 eit = bit + strlen(bit);
32 exp = bit+test[i].off;
33 got = utils::find_bm(bit, eit, test[i].pattern);
34 TEST_ASSERT_EQUALS_M(exp, got, std::string() << "text: " << test[i].text << " pattern: " << test[i].pattern << " exp: " << exp-bit << " got: " << got-bit);