changing cComposite Chat to newer c++ standart (#5028)
* upgraded to new C++ for loops and fixed errors * readded delete instruction * now using unique ptr * added test for text only (that was causing an error for me) * using unique ptr constructor * added move constructor and deleted copy constructor * fixed deconstuctor http prefixes are constexpr and std::string_view * fixed whitespace Co-authored-by: 12xx12 <12xx12100@gmail.com>
This commit is contained in:
@@ -96,6 +96,19 @@ static void TestParser5(void)
|
||||
|
||||
|
||||
|
||||
static void TestParser6(void)
|
||||
{
|
||||
cCompositeChat Msg;
|
||||
Msg.ParseText("Hello World");
|
||||
const cCompositeChat::cParts & Parts = Msg.GetParts();
|
||||
TEST_EQUAL(Parts.size(), 1);
|
||||
TEST_EQUAL(Parts[0]->m_PartType, cCompositeChat::ptText);
|
||||
TEST_EQUAL(Parts[0]->m_Style, "");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
IMPLEMENT_TEST_MAIN("CompositeChat",
|
||||
TestParser1();
|
||||
@@ -103,4 +116,5 @@ IMPLEMENT_TEST_MAIN("CompositeChat",
|
||||
TestParser3();
|
||||
TestParser4();
|
||||
TestParser5();
|
||||
TestParser6();
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user