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

Method testHeaders

test/beast/http/fields.cpp:308–328  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306 }
307
308 void testHeaders()
309 {
310 f_t f1;
311 BEAST_EXPECT(empty(f1));
312 fill(1, f1);
313 BEAST_EXPECT(size(f1) == 1);
314 f_t f2;
315 f2 = f1;
316 BEAST_EXPECT(size(f2) == 1);
317 f2.insert("2", "2");
318 BEAST_EXPECT(std::distance(f2.begin(), f2.end()) == 2);
319 f1 = std::move(f2);
320 BEAST_EXPECT(size(f1) == 2);
321 BEAST_EXPECT(size(f2) == 0);
322 f_t f3(std::move(f1));
323 BEAST_EXPECT(size(f3) == 2);
324 BEAST_EXPECT(size(f1) == 0);
325 self_assign(f3, std::move(f3));
326 BEAST_EXPECT(size(f3) == 2);
327 BEAST_EXPECT(f2.erase("Not-Present") == 0);
328 }
329
330 void testRFC2616()
331 {

Callers

nothing calls this directly

Calls 5

moveClass · 0.85
sizeFunction · 0.50
insertMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected