#include "CppUTest/TestHarness.h" #include "CppUTest/CommandLineTestRunner.h" #include "btstack_util.h" #include "btstack_debug.h" #include "classic/obex.h" #include "classic/obex_message_builder.h" // mock hci_dump.c extern "C" void hci_dump_log(int log_level, const char * format, ...){} static const uint8_t service_uuid[] = {0xbb, 0x58, 0x2b, 0x40, 0x42, 0xc, 0x11, 0xdb, 0xb0, 0xde, 0x8, 0x0, 0x20, 0xc, 0x9a, 0x66}; static const uint8_t application_parameters[] = {0x29, 4, 0, 0, 0xFF, 0xFF}; static const char path_element[] = "test"; static const uint8_t flags = 1 << 1; static const uint16_t maximum_obex_packet_length = 0xFFFF; static const uint32_t connection_id = 10; static const uint8_t obex_version_number = OBEX_VERSION; TEST_GROUP(OBEX_MESSAGE_BUILDER){ uint8_t actual_message[300]; uint16_t actual_message_len; void setup(void){ actual_message_len = sizeof(actual_message); memset(actual_message, 0, actual_message_len); } void CHECK_EQUAL_ARRAY(const uint8_t * expected, uint8_t * actual, int size){ for (int i=0; i