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

Method TestParser1

src/CompositeChat.cpp:30–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28 }
29
30 void TestParser1(void)
31 {
32 cCompositeChat Msg;
33 Msg.ParseText("Testing @2color codes and http://links parser");
34 const cCompositeChat::cParts & Parts = Msg.GetParts();
35 assert_test(Parts.size() == 4);
36 assert_test(Parts[0]->m_PartType == cCompositeChat::ptText);
37 assert_test(Parts[1]->m_PartType == cCompositeChat::ptText);
38 assert_test(Parts[2]->m_PartType == cCompositeChat::ptUrl);
39 assert_test(Parts[3]->m_PartType == cCompositeChat::ptText);
40 assert_test(Parts[0]->m_Style == "");
41 assert_test(Parts[1]->m_Style == "@2");
42 assert_test(Parts[2]->m_Style == "@2");
43 assert_test(Parts[3]->m_Style == "@2");
44 }
45
46 void TestParser2(void)
47 {

Callers

nothing calls this directly

Calls 2

ParseTextMethod · 0.80
sizeMethod · 0.80

Tested by

no test coverage detected