// NeL - MMORPG Framework
// Copyright (C) 2010 Winch Gate Property Limited
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see .
#ifndef UT_NET_MESSAGE
#define UT_NET_MESSAGE
class CUTNetMessage: public Test::Suite
{
public:
CUTNetMessage ()
{
TEST_ADD(CUTNetMessage::messageSwap);
TEST_ADD(CUTNetMessage::lockSubMEssage);
TEST_ADD(CUTNetMessage::lockSubMEssageWithLongName);
}
void lockSubMEssageWithLongName()
{
CMessage master("BIG");
// serial some stuff
for (uint8 i=0; i<10; ++i)
{
master.serial(i);
}
uint32 sizes[4];
// serial 4 sub messages
for (uint i=0; i<4; ++i)
{
CMessage sub(toString("A_VERY_LONG_SUB_MESSAGE_NAME_%u", i));
for (uint8 j=0; j