MCPcopy Create free account
hub / github.com/boostorg/beast / testIterators

Method testIterators

test/beast/core/static_string.cpp:494–520  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

492 }
493
494 void
495 testIterators()
496 {
497 {
498 static_string<3> s;
499 BEAST_EXPECT(std::distance(
500 s.begin(), s.end()) == 0);
501 BEAST_EXPECT(std::distance(
502 s.rbegin(), s.rend()) == 0);
503 s = "123";
504 BEAST_EXPECT(std::distance(
505 s.begin(), s.end()) == 3);
506 BEAST_EXPECT(std::distance(
507 s.rbegin(), s.rend()) == 3);
508 }
509 {
510 static_string<3> const s("123");
511 BEAST_EXPECT(std::distance(
512 s.begin(), s.end()) == 3);
513 BEAST_EXPECT(std::distance(
514 s.cbegin(), s.cend()) == 3);
515 BEAST_EXPECT(std::distance(
516 s.rbegin(), s.rend()) == 3);
517 BEAST_EXPECT(std::distance(
518 s.crbegin(), s.crend()) == 3);
519 }
520 }
521
522 void
523 testCapacity()

Callers

nothing calls this directly

Calls 4

cbeginMethod · 0.80
cendMethod · 0.80
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected