MCPcopy Create free account
hub / github.com/HelenOS/helenos / test_copy

Method test_copy

uspace/lib/cpp/src/__bits/test/string.cpp:381–394  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

379 }
380
381 void string_test::test_copy()
382 {
383 std::string check{"CCABB"};
384
385 std::string str1{"ACCCA"};
386 std::string str2{"BBBBB"};
387
388 str1.copy(const_cast<char*>(str2.c_str()), 3, 2);
389 test_eq(
390 "copy",
391 str2.begin(), str2.end(),
392 check.begin(), check.end()
393 );
394 }
395
396 void string_test::test_find()
397 {

Callers

nothing calls this directly

Calls 4

c_strMethod · 0.80
copyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected