You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
760 B
50 lines
760 B
#include "runtest.h"
|
|
#include "token/cclass.h"
|
|
#include "token/packet.h"
|
|
#include "token/dyntype.h"
|
|
|
|
|
|
const char testname[] = "packetTest";
|
|
struct PACKET * packet = NULL;
|
|
|
|
|
|
static
|
|
int
|
|
__setUp()
|
|
{
|
|
packet = new(PACKET, NULL);
|
|
|
|
ASSERT_INSTANCE_OF(PACKET, packet);
|
|
return TEST_OK;
|
|
}
|
|
int (* const setUp)() = __setUp;
|
|
|
|
static
|
|
int
|
|
__tearDown()
|
|
{
|
|
if (NULL != packet) {
|
|
ASSERT_OBJECT(packet);
|
|
delete(&packet);
|
|
}
|
|
|
|
return TEST_OK;
|
|
}
|
|
int (* const tearDown)() = __tearDown;
|
|
|
|
static
|
|
int
|
|
testDefaultInit()
|
|
{
|
|
ASSERT_NULL(packet_getHeader(packet));
|
|
ASSERT_NULL(packet_getData(packet));
|
|
|
|
return TEST_OK;
|
|
}
|
|
|
|
const testfunc tests[] = {
|
|
testDefaultInit
|
|
};
|
|
const size_t count = FUNCS_COUNT(tests);
|
|
|
|
// vim: set et ts=4 sw=4:
|