corrected to pass unit testing
This commit is contained in:
@@ -596,6 +596,7 @@ bool octetstring_value_same(
|
|||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <time.h>
|
||||||
#include "ctest.h"
|
#include "ctest.h"
|
||||||
|
|
||||||
void testBitString(
|
void testBitString(
|
||||||
|
|||||||
@@ -417,12 +417,20 @@ void testGetEventInformationAck(
|
|||||||
}
|
}
|
||||||
event_data.next = NULL;
|
event_data.next = NULL;
|
||||||
|
|
||||||
len =
|
len = getevent_ack_encode_apdu_init(&apdu[0], sizeof(apdu), invoke_id);
|
||||||
getevent_ack_encode_apdu(&apdu[0], sizeof(apdu), invoke_id,
|
|
||||||
&event_data, moreEvents);
|
|
||||||
ct_test(pTest, len != 0);
|
ct_test(pTest, len != 0);
|
||||||
ct_test(pTest, len != -1);
|
ct_test(pTest, len != -1);
|
||||||
apdu_len = len;
|
apdu_len = len;
|
||||||
|
len = getevent_ack_encode_apdu_data(&apdu[apdu_len],
|
||||||
|
sizeof(apdu)-apdu_len, &event_data);
|
||||||
|
ct_test(pTest, len != 0);
|
||||||
|
ct_test(pTest, len != -1);
|
||||||
|
apdu_len += len;
|
||||||
|
len = getevent_ack_encode_apdu_end(&apdu[apdu_len],
|
||||||
|
sizeof(apdu)-apdu_len, moreEvents);
|
||||||
|
ct_test(pTest, len != 0);
|
||||||
|
ct_test(pTest, len != -1);
|
||||||
|
apdu_len += len;
|
||||||
len = getevent_ack_decode_apdu(&apdu[0], apdu_len, /* total length of the apdu */
|
len = getevent_ack_decode_apdu(&apdu[0], apdu_len, /* total length of the apdu */
|
||||||
&test_invoke_id, &test_event_data, &test_moreEvents);
|
&test_invoke_id, &test_event_data, &test_moreEvents);
|
||||||
ct_test(pTest, len != -1);
|
ct_test(pTest, len != -1);
|
||||||
|
|||||||
@@ -8,6 +8,14 @@ CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g
|
|||||||
|
|
||||||
SRCS = $(SRC_DIR)/address.c \
|
SRCS = $(SRC_DIR)/address.c \
|
||||||
$(SRC_DIR)/bacaddr.c \
|
$(SRC_DIR)/bacaddr.c \
|
||||||
|
$(SRC_DIR)/bacdcode.c \
|
||||||
|
$(SRC_DIR)/bacint.c \
|
||||||
|
$(SRC_DIR)/bacstr.c \
|
||||||
|
$(SRC_DIR)/bacreal.c \
|
||||||
|
$(SRC_DIR)/bacapp.c \
|
||||||
|
$(SRC_DIR)/datetime.c \
|
||||||
|
$(SRC_DIR)/bactext.c \
|
||||||
|
$(SRC_DIR)/indtext.c \
|
||||||
ctest.c
|
ctest.c
|
||||||
|
|
||||||
OBJS = ${SRCS:.c=.o}
|
OBJS = ${SRCS:.c=.o}
|
||||||
|
|||||||
Reference in New Issue
Block a user