text
stringlengths
0
2.2M
position2 = text.find_first_not_of(TextT(STR("ZAXB")), text.size());
CHECK_EQUAL(position1, position2);
position1 = compare_text.find_first_not_of(Compare_Text(STR("ZAXB")), 100);
position2 = text.find_first_not_of(TextT(STR("ZAXB")), 100);
CHECK_EQUAL(position1, position2);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_find_first_not_of_pointer_position)
{
Compare_Text compare_text(STR("ABCDEF"));
TextBuffer buffer;
Text text(STR("ABCDEF"), buffer.data(), buffer.size());
size_t position1 = compare_text.find_first_not_of(STR("ZAXB"));
size_t position2 = text.find_first_not_of(STR("ZAXB"));
CHECK_EQUAL(position1, position2);
position1 = compare_text.find_first_not_of(STR("ZAXB"));
position2 = text.find_first_not_of(STR("ZAXB"));
CHECK_EQUAL(position1, position2);
position1 = compare_text.find_first_not_of(STR("ZAXB"), 3);
position2 = text.find_first_not_of(STR("ZAXB"), 3);
CHECK_EQUAL(position1, position2);
position1 = compare_text.find_first_not_of(STR("ZAXB"), compare_text.size());
position2 = text.find_first_not_of(STR("ZAXB"), text.size());
CHECK_EQUAL(position1, position2);
position1 = compare_text.find_first_not_of(STR("ZAXB"), 100);
position2 = text.find_first_not_of(STR("ZAXB"), 100);
CHECK_EQUAL(position1, position2);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_find_first_not_of_pointer_position_n)
{
Compare_Text compare_text(STR("ABCDEF"));
TextBuffer buffer;
Text text(STR("ABCDEF"), buffer.data(), buffer.size());
size_t position1 = compare_text.find_first_not_of(STR("ZAXB"), 0, 4);
size_t position2 = text.find_first_not_of(STR("ZAXB"), 0, 4);
CHECK_EQUAL(position1, position2);
position1 = compare_text.find_first_not_of(STR("ZAXB"), 0, 4);
position2 = text.find_first_not_of(STR("ZAXB"), 0, 4);
CHECK_EQUAL(position1, position2);
position1 = compare_text.find_first_not_of(STR("ZAXB"), 1, 3);
position2 = text.find_first_not_of(STR("ZAXB"), 1, 3);
CHECK_EQUAL(position1, position2);
position1 = compare_text.find_first_not_of(STR("ZAXB"), 3, 3);
position2 = text.find_first_not_of(STR("ZAXB"), 3, 3);
CHECK_EQUAL(position1, position2);
position1 = compare_text.find_first_not_of(STR("ZAXB"), compare_text.size(), 3);
position2 = text.find_first_not_of(STR("ZAXB"), text.size(), 3);
CHECK_EQUAL(position1, position2);
position1 = compare_text.find_first_not_of(STR("ZAXB"), 100);
position2 = text.find_first_not_of(STR("ZAXB"), 100);
CHECK_EQUAL(position1, position2);
}
//*************************************************************************
TEST_FIXTURE(SetupFixture, test_find_first_not_of_character_position)
{
Compare_Text compare_text(STR("ABCDEF"));
TextBuffer buffer;
Text text(STR("ABCDEF"), buffer.data(), buffer.size());
size_t position1 = compare_text.find_first_not_of(STR('A'));
size_t position2 = text.find_first_not_of(STR('A'));
CHECK_EQUAL(position1, position2);
position1 = compare_text.find_first_not_of(STR('B'));
position2 = text.find_first_not_of(STR('B'));
CHECK_EQUAL(position1, position2);