2
* FreeRDP: A Remote Desktop Protocol Client
5
* Copyright 2010 Marc-Andre Moreau <marcandre.moreau@gmail.com>
7
* Licensed under the Apache License, Version 2.0 (the "License");
8
* you may not use this file except in compliance with the License.
9
* You may obtain a copy of the License at
11
* http://www.apache.org/licenses/LICENSE-2.0
13
* Unless required by applicable law or agreed to in writing, software
14
* distributed under the License is distributed on an "AS IS" BASIS,
15
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
* See the License for the specific language governing permissions and
17
* limitations under the License.
23
#include <CUnit/CUnit.h>
24
#include <freerdp/types.h>
25
#include <freerdp/utils/stream.h>
26
#include <freerdp/utils/hexdump.h>
28
#define add_test_suite(name) \
30
pSuite = CU_add_suite(#name, init_##name##_suite, clean_##name##_suite); \
31
if (pSuite == NULL) { \
32
CU_cleanup_registry(); return CU_get_error(); \
35
#define add_test_function(name) \
36
if (CU_add_test(pSuite, #name, test_##name) == NULL) { \
37
CU_cleanup_registry(); return CU_get_error(); \
40
void dump_data(unsigned char * p, int len, int width, char* name);
41
void assert_stream(STREAM* s, uint8* data, int length, const char* func, int line);
43
#define ASSERT_STREAM(_s, _data, _length) assert_stream(_s, _data, _length, __FUNCTION__, __LINE__)