Пример #1
0
TEST(DataBuffer, Search2) {
	DataBuffer db;
	const char* str = "the quick brown fox...";
	db.append((uint8_t*)str, 22);
	DataBufferData d = db.get();
	d.free();
	ASSERT_EQ(-1, db.indexOf("brown"));
}
Пример #2
0
TEST(DataBuffer, Search4) {
	DataBuffer db;
	const char* str = "brow";
	db.append((uint8_t*)str, 4);
	ASSERT_EQ(-1, db.indexOf("brown"));
}
Пример #3
0
TEST(DataBuffer, Search1) {
	DataBuffer db;
	const char* str = "the quick brown fox...";
	db.append((uint8_t*)str, 22);
	ASSERT_EQ(10, db.indexOf("brown"));
}