MCPcopy Create free account
hub / github.com/boostorg/json / testFind

Method testFind

test/string.cpp:2589–2607  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2587 }
2588
2589 void
2590 testFind()
2591 {
2592 test_vectors const t;
2593 string const s1 = t.v1;
2594
2595 // find(string_view, size_type)
2596 BOOST_TEST(s1.find("bcd") == 1);
2597 BOOST_TEST(s1.find("cde") == 2);
2598
2599 BOOST_TEST(s1.find("bcd", 0) == 1);
2600 BOOST_TEST(s1.find("cde", 1) == 2);
2601 BOOST_TEST(s1.find("efg", 5) == string::npos);
2602
2603 // find(char, size_type)
2604 BOOST_TEST(s1.find('b') == 1);
2605 BOOST_TEST(s1.find('c', 1) == 2);
2606 BOOST_TEST(s1.find('e', 5) == string::npos);
2607 }
2608
2609 void
2610 testRfind()

Callers

nothing calls this directly

Calls 1

findMethod · 0.80

Tested by

no test coverage detected