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

Method testIteratorErase

test/beast/http/fields.cpp:352–364  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350 }
351
352 void testIteratorErase()
353 {
354 f_t f;
355 f.insert("a", "x");
356 f.insert("b", "y");
357 f.insert("c", "z");
358 BEAST_EXPECT(size(f) == 3);
359 f_t::const_iterator i = std::next(f.begin());
360 f.erase(i);
361 BEAST_EXPECT(size(f) == 2);
362 BEAST_EXPECT(std::next(f.begin(), 0)->name_string() == "a");
363 BEAST_EXPECT(std::next(f.begin(), 1)->name_string() == "c");
364 }
365
366 void
367 testContainer()

Callers

nothing calls this directly

Calls 3

sizeFunction · 0.50
insertMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected