MCPcopy Create free account
hub / github.com/InoriRus/Kyty / test_move

Function test_move

source/unit_test/src/core/UnitTestCoreString8.cpp:707–718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

705}
706
707void test_move()
708{
709 String8 str = "123";
710 StringList8 list;
711 EXPECT_TRUE(!str.IsInvalid());
712 list.Add(std::move(str));
713 EXPECT_TRUE(str.IsInvalid()); // NOLINT(hicpp-invalid-access-moved,bugprone-use-after-move)
714 str = "234";
715 EXPECT_TRUE(!str.IsInvalid());
716 EXPECT_EQ(str, "234");
717 EXPECT_EQ(list, StringList8({"123"}));
718}
719
720TEST(Core, CharString8)
721{

Callers 1

TESTFunction · 0.70

Calls 3

StringList8Class · 0.85
IsInvalidMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected