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

Method testRfind

test/string.cpp:2609–2627  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2607 }
2608
2609 void
2610 testRfind()
2611 {
2612 test_vectors const t;
2613 string const s1 = t.v1;
2614
2615 // rfind(string_view, size_type)
2616 BOOST_TEST(s1.rfind("bcd") == 1);
2617 BOOST_TEST(s1.rfind("cde") == 2);
2618
2619 BOOST_TEST(s1.rfind("bcd", 1) == 1);
2620 BOOST_TEST(s1.rfind("cde", 2) == 2);
2621 BOOST_TEST(s1.rfind("efg", 3) == string::npos);
2622
2623 // rfind(char, size_type)
2624 BOOST_TEST(s1.rfind('b') == 1);
2625 BOOST_TEST(s1.rfind('c', 2) == 2);
2626 BOOST_TEST(s1.rfind('e', 3) == string::npos);
2627 }
2628
2629 void
2630 testFindFirstOf()

Callers

nothing calls this directly

Calls 1

rfindMethod · 0.80

Tested by

no test coverage detected