| 612 | } |
| 613 | |
| 614 | static bool testMethodIterators() |
| 615 | { |
| 616 | std::cout << "testMethodIterators()\n"; |
| 617 | cm::String str = "abc"; |
| 618 | ASSERT_TRUE(*str.begin() == 'a'); |
| 619 | ASSERT_TRUE(*(str.end() - 1) == 'c'); |
| 620 | ASSERT_TRUE(str.end() - str.begin() == 3); |
| 621 | ASSERT_TRUE(*str.cbegin() == 'a'); |
| 622 | ASSERT_TRUE(*(str.cend() - 1) == 'c'); |
| 623 | ASSERT_TRUE(str.cend() - str.cbegin() == 3); |
| 624 | ASSERT_TRUE(*str.rbegin() == 'c'); |
| 625 | ASSERT_TRUE(*(str.rend() - 1) == 'a'); |
| 626 | ASSERT_TRUE(str.rend() - str.rbegin() == 3); |
| 627 | ASSERT_TRUE(*str.crbegin() == 'c'); |
| 628 | ASSERT_TRUE(*(str.crend() - 1) == 'a'); |
| 629 | ASSERT_TRUE(str.crend() - str.crbegin() == 3); |
| 630 | return true; |
| 631 | } |
| 632 | |
| 633 | static bool testMethod_clear() |
| 634 | { |
nothing calls this directly
no test coverage detected
searching dependent graphs…