| 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 | { |