MCPcopy Create free account
hub / github.com/cuberite/cuberite / TestParser2

Method TestParser2

src/CompositeChat.cpp:46–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44 }
45
46 void TestParser2(void)
47 {
48 cCompositeChat Msg;
49 Msg.ParseText("@3Advanced stuff: @5overriding color codes and http://links.with/@4color-in-them handling");
50 const cCompositeChat::cParts & Parts = Msg.GetParts();
51 assert_test(Parts.size() == 4);
52 assert_test(Parts[0]->m_PartType == cCompositeChat::ptText);
53 assert_test(Parts[1]->m_PartType == cCompositeChat::ptText);
54 assert_test(Parts[2]->m_PartType == cCompositeChat::ptUrl);
55 assert_test(Parts[3]->m_PartType == cCompositeChat::ptText);
56 assert_test(Parts[0]->m_Style == "@3");
57 assert_test(Parts[1]->m_Style == "@5");
58 assert_test(Parts[2]->m_Style == "@5");
59 assert_test(Parts[3]->m_Style == "@5");
60 }
61
62 void TestParser3(void)
63 {

Callers

nothing calls this directly

Calls 2

ParseTextMethod · 0.80
sizeMethod · 0.80

Tested by

no test coverage detected