c732d49e |
/*
* Copyright (C) 2009 Mamadou Diop.
*
* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
*
* This file is part of Open Source Doubango Framework.
*
* DOUBANGO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* DOUBANGO 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with DOUBANGO.
*
*/
#ifndef _TEST_PARSER_H_
#define _TEST_PARSER_H_
char packet_0[] = {
0x80, 0x88, 0x00, 0x01, 0x00, 0x00, 0x00, 0xa0,
0xd2, 0xbd, 0x4e, 0x3e, 0xdc, 0xde, 0xc4, 0xc5,
0xdc, 0xd0, 0xd5, 0x51, 0x53, 0x5d, 0x5f, 0x5b,
0x46, 0x46, 0x46, 0x5b, 0x44, 0x41, 0x42, 0x4f,
0x42, 0x47, 0x42, 0x43, 0x59, 0x58, 0x59, 0x5f,
0x5f, 0x52, 0x59, 0x44, 0x44, 0x5f, 0x51, 0x54,
0x55, 0x55, 0x51, 0x56, 0x50, 0x52, 0x5e, 0x58,
0x5d, 0x52, 0x52, 0x50, 0x57, 0x54, 0xd4, 0xd6,
0xd5, 0x51, 0x53, 0x57, 0xd6, 0xd6, 0xd0, 0xd7,
0x57, 0x56, 0x57, 0xd0, 0xd3, 0xd6, 0xd5, 0x55,
0x51, 0x50, 0xd6, 0xdf, 0xd2, 0xd1, 0xd4, 0xd6,
0xdc, 0xdb, 0xda, 0xdd, 0xd6, 0x55, 0xdc, 0xd0,
0xd4, 0x5d, 0x44, 0x5c, 0x56, 0xd6, 0xd5, 0xd4,
0xd5, 0xd7, 0x50, 0xd4, 0x51, 0xd0, 0x61, 0x6f,
0x76, 0xfe, 0xef, 0xf7, 0x77, 0x66, 0x50, 0xff,
0xe5, 0xd7, 0x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0x80, 0x08, 0x00, 0x05, 0x00, 0x00, 0x03, 0x20,
0xd2, 0xbd, 0x4e, 0x3e, 0xca, 0xf0, 0xfd, 0xe2,
0xea, 0x96, 0x91, 0x91, 0xe7, 0xd9, 0xf9, 0xf9,
0x48, 0x6b, 0x61, 0x74, 0x66, 0x15, 0x69, 0x74,
0x42, 0x7d, 0x75, 0xd2, 0xf7, 0xc8, 0xc3, 0xd1,
0x5f, 0x5f, 0x7d, 0x6f, 0x15, 0x6d, 0x6e, 0x16,
0x16, 0x68, 0x61, 0x62, 0x6c, 0x66, 0x79, 0x7d,
0x7f, 0x77, 0x5c, 0xd9, 0xdb, 0x5e, 0x55, 0xcf,
0xf1, 0xf0, 0xe5, 0xef, 0x95, 0x96, 0x93, 0x97,
0xcd, 0xc3, 0xe4, 0xf7, 0x64, 0x15, 0x7a, 0x73,
0x60, 0x68, 0x64, 0xd1, 0x53, 0x4e, 0x5d, 0xf7,
0xf9, 0xf3, 0xf5, 0xd5, 0xd4, 0x58, 0x67, 0x6e,
0x6c, 0x61, 0x68, 0x14, 0x68, 0x61, 0x64, 0x63,
0x61, 0x79, 0x75, 0x4b, 0x4f, 0x44, 0xd7, 0xcb,
0xc0, 0xd8, 0xf6, 0xe4, 0xe1, 0xe7, 0xed, 0x97,
0x91, 0x93, 0x9d, 0x96, 0xff, 0xfd, 0xe5, 0xc7,
0x66, 0x67, 0x4d, 0x4e, 0x64, 0x62, 0x71, 0x54,
0xd5, 0x5f, 0xd0, 0xce, 0xce, 0xdf, 0x5d, 0x73,
0x72, 0x73, 0x6c, 0x15, 0x6d, 0x6d, 0x15, 0x14,
0x69, 0x63, 0x62, 0x62, 0x66, 0x78, 0x72, 0x76,
0x43, 0x5b, 0xd5, 0xc0, 0xd9, 0xdd, 0xca, 0xf8,
0xe4, 0xe7, 0xef, 0x96 };
char packet_7[] = {
0x80, 0x08, 0x2c, 0x45, 0x11, 0x47, 0x32, 0xe2,
0x58, 0xf3, 0x3d, 0xea, 0xdd, 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5e, 0xd6, 0x57, 0xd0, 0xc5, 0xdf, 0xc6, 0xcd,
0xc5, 0x51, 0x50, 0xd0, 0xd6, 0xd2, 0xdb, 0x5d,
0x75, 0x75, 0x73, 0x75, 0xc0, 0xf7, 0xf0, 0xf6,
0xc9, 0xd8, 0xd5, 0x57, 0x56, 0x48, 0x70, 0x75,
0x42, 0x42, 0x5f, 0xd0, 0x5d, 0x5b, 0x5c, 0x55,
0xd6, 0xc1, 0xcf, 0xd8, 0xd3, 0xd0, 0x45, 0x4f,
0x54, 0xc6, 0xd0, 0x59, 0x55, 0xc4, 0xd1, 0x5a,
0x73, 0x7f, 0x47, 0x54, 0xd1, 0xdf, 0xdc, 0xd7,
0xc7, 0xc8, 0xdb, 0xc7, 0xca, 0xc9, 0xc0, 0xc7,
0xc1, 0x51, 0x40, 0x5f, 0x52, 0xd7, 0xda, 0xdf,
0x41, 0x4c, 0x56, 0x54, 0x5f, 0x4a, 0x4a, 0x4e,
0x5d, 0xc4, 0xc6, 0xcd, 0xc7, 0xd6, 0x52, 0xd4,
0xc4, 0xc4, 0xc6, 0xd5, 0x5b, 0x41, 0x4e, 0x56,
0xc4, 0xd8, 0x54, 0x5e, 0x4d, 0x48, 0x76, 0x73,
0x4d, 0x5b, 0x59, 0xd8, 0xf0, 0xf7, 0xde, 0x52,
0xd0, 0xc3, 0xfd, 0xfa, 0xfd, 0xc1, 0x40, 0x4a,
0x5a, 0x45, 0x5d, 0xd0 };
#define MAKE_TEST(n) \
/* deserialize the packet*/ \
if((packet = trtp_rtp_packet_deserialize(packet_##n, sizeof(packet_##n)))){ \
/* serialize the packet */ \
if((buffer = trtp_rtp_packet_serialize(packet))){ \
/* compare data */ \
if(sizeof(packet_##n) != buffer->size){ \
TSK_DEBUG_ERROR("Test-%d: Sizes are different", n); \
} \
else{ \
for(i=0; i<buffer->size; i++){ \
if(packet_##n[i] != ((char*)buffer->data)[i]){ \
TSK_DEBUG_ERROR("Test-%d: Data is different", n); \
break; \
} \
} \
if(i==buffer->size){ \
TSK_DEBUG_INFO("Test-%d: OK", n); \
} \
} \
} \
else{ \
TSK_DEBUG_ERROR("Failed to serialize packet-%d", n); \
} \
\
TSK_OBJECT_SAFE_FREE(buffer); \
TSK_OBJECT_SAFE_FREE(packet); \
} \
else{ \
TSK_DEBUG_ERROR("Failed to deserialize packet-%d", n); \
}
void test_parser()
{
trtp_rtp_packet_t* packet;
tsk_buffer_t* buffer;
tsk_size_t i;
MAKE_TEST(0);
MAKE_TEST(1);
MAKE_TEST(2);
MAKE_TEST(3);
MAKE_TEST(4);
MAKE_TEST(5);
MAKE_TEST(6);
MAKE_TEST(7);
MAKE_TEST(8);
MAKE_TEST(9);
MAKE_TEST(10);
}
#endif /* _TEST_PARSER_H_ */ |