Fixed the unit tests after integration of property-list property and device-object-property-reference properties. Thank you for noticing it was broken, Nikola Jelić, and for sending in fixes.

This commit is contained in:
skarg
2015-11-04 16:53:21 +00:00
parent b5e860dbe4
commit 8a48241e14
31 changed files with 96 additions and 88 deletions
+1 -1
View File
@@ -14,11 +14,11 @@ SRCS = ai.c \
$(SRC_DIR)/bacstr.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/indtext.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/lighting.c \
$(SRC_DIR)/proplist.c \
$(TEST_DIR)/ctest.c
TARGET = analog_input
+1 -1
View File
@@ -13,9 +13,9 @@ SRCS = ao.c \
$(SRC_DIR)/bacstr.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/proplist.c \
$(SRC_DIR)/lighting.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/indtext.c \
$(TEST_DIR)/ctest.c
-2
View File
@@ -237,13 +237,11 @@ bool Analog_Value_Object_Name(
int Analog_Value_Read_Property(
BACNET_READ_PROPERTY_DATA * rpdata)
{
int len = 0;
int apdu_len = 0; /* return value */
BACNET_BIT_STRING bit_string;
BACNET_CHARACTER_STRING char_string;
float real_value = (float) 1.414;
unsigned object_index = 0;
unsigned i = 0;
bool state = false;
uint8_t *apdu = NULL;
ANALOG_VALUE_DESCR *CurrentAV;
+5 -5
View File
@@ -13,9 +13,9 @@ SRCS = av.c \
$(SRC_DIR)/bacstr.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/proplist.c \
$(SRC_DIR)/lighting.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/indtext.c \
$(TEST_DIR)/ctest.c
@@ -23,19 +23,19 @@ SRCS = av.c \
TARGET = analog_value
all: ${TARGET}
OBJS = ${SRCS:.c=.o}
${TARGET}: ${OBJS}
${CC} -o $@ ${OBJS}
${CC} -o $@ ${OBJS}
.c.o:
${CC} -c ${CFLAGS} $*.c -o $@
depend:
rm -f .depend
${CC} -MM ${CFLAGS} *.c >> .depend
clean:
rm -rf core ${TARGET} $(OBJS)
+5 -5
View File
@@ -13,29 +13,29 @@ SRCS = bi.c \
$(SRC_DIR)/bacstr.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/indtext.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/proplist.c \
$(SRC_DIR)/lighting.c \
$(TEST_DIR)/ctest.c
TARGET = binary_input
all: ${TARGET}
OBJS = ${SRCS:.c=.o}
${TARGET}: ${OBJS}
${CC} -o $@ ${OBJS}
${CC} -o $@ ${OBJS}
.c.o:
${CC} -c ${CFLAGS} $*.c -o $@
depend:
rm -f .depend
${CC} -MM ${CFLAGS} *.c >> .depend
clean:
rm -rf core ${TARGET} $(OBJS)
+5 -5
View File
@@ -14,8 +14,8 @@ SRCS = bo.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/proplist.c \
$(SRC_DIR)/lighting.c \
$(SRC_DIR)/indtext.c \
$(TEST_DIR)/ctest.c
@@ -23,19 +23,19 @@ SRCS = bo.c \
TARGET = binary_output
all: ${TARGET}
OBJS = ${SRCS:.c=.o}
${TARGET}: ${OBJS}
${CC} -o $@ ${OBJS}
${CC} -o $@ ${OBJS}
.c.o:
${CC} -c ${CFLAGS} $*.c -o $@
depend:
rm -f .depend
${CC} -MM ${CFLAGS} *.c >> .depend
clean:
rm -rf core ${TARGET} $(OBJS)
+5 -5
View File
@@ -14,28 +14,28 @@ SRCS = bv.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/indtext.c \
$(SRC_DIR)/proplist.c \
$(SRC_DIR)/lighting.c \
$(TEST_DIR)/ctest.c
TARGET = binary_value
all: ${TARGET}
OBJS = ${SRCS:.c=.o}
${TARGET}: ${OBJS}
${CC} -o $@ ${OBJS}
${CC} -o $@ ${OBJS}
.c.o:
${CC} -c ${CFLAGS} $*.c -o $@
depend:
rm -f .depend
${CC} -MM ${CFLAGS} *.c >> .depend
clean:
rm -rf core ${TARGET} $(OBJS)
+1 -1
View File
@@ -14,11 +14,11 @@ SRCS = command.c \
$(SRC_DIR)/bacstr.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/indtext.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/lighting.c \
$(SRC_DIR)/proplist.c \
$(TEST_DIR)/ctest.c
TARGET = command
+1 -1
View File
@@ -14,9 +14,9 @@ SRCS = csv.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/indtext.c \
$(SRC_DIR)/proplist.c \
$(SRC_DIR)/lighting.c \
$(TEST_DIR)/ctest.c
+2
View File
@@ -9,6 +9,7 @@ DEFINES += -DTEST -DBACDL_TEST
DEFINES += -DBACAPP_ALL
DEFINES += -DMAX_TSM_TRANSACTIONS=0
DEFINES += -DTEST_DEVICE
DEFINES += -DBACNET_PROPERTY_LISTS=1
CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g
@@ -19,6 +20,7 @@ SRCS = device.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/indtext.c \
$(SRC_DIR)/proplist.c \
+5 -5
View File
@@ -14,28 +14,28 @@ SRCS = lc.c ao.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/indtext.c \
$(SRC_DIR)/proplist.c \
$(SRC_DIR)/lighting.c \
$(TEST_DIR)/ctest.c
TARGET = load_control
all: ${TARGET}
OBJS = ${SRCS:.c=.o}
${TARGET}: ${OBJS}
${CC} -o $@ ${OBJS}
${CC} -o $@ ${OBJS}
.c.o:
${CC} -c ${CFLAGS} $*.c -o $@
depend:
rm -f .depend
${CC} -MM ${CFLAGS} *.c >> .depend
clean:
rm -rf core ${TARGET} $(OBJS)
+5 -5
View File
@@ -14,28 +14,28 @@ SRCS = lo.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/indtext.c \
$(SRC_DIR)/proplist.c \
$(SRC_DIR)/lighting.c \
$(TEST_DIR)/ctest.c
TARGET = lighting_output
all: ${TARGET}
OBJS = ${SRCS:.c=.o}
${TARGET}: ${OBJS}
${CC} -o $@ ${OBJS}
${CC} -o $@ ${OBJS}
.c.o:
${CC} -c ${CFLAGS} $*.c -o $@
depend:
rm -f .depend
${CC} -MM ${CFLAGS} *.c >> .depend
clean:
rm -rf core ${TARGET} $(OBJS)
+5 -5
View File
@@ -14,28 +14,28 @@ SRCS = lsp.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/indtext.c \
$(SRC_DIR)/proplist.c \
$(SRC_DIR)/lighting.c \
$(TEST_DIR)/ctest.c
TARGET = life_safety_point
all: ${TARGET}
OBJS = ${SRCS:.c=.o}
${TARGET}: ${OBJS}
${CC} -o $@ ${OBJS}
${CC} -o $@ ${OBJS}
.c.o:
${CC} -c ${CFLAGS} $*.c -o $@
depend:
rm -f .depend
${CC} -MM ${CFLAGS} *.c >> .depend
clean:
rm -rf core ${TARGET} $(OBJS)
+5 -5
View File
@@ -14,28 +14,28 @@ SRCS = ms-input.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/indtext.c \
$(SRC_DIR)/proplist.c \
$(SRC_DIR)/lighting.c \
$(TEST_DIR)/ctest.c
TARGET = multistate_input
all: ${TARGET}
OBJS = ${SRCS:.c=.o}
${TARGET}: ${OBJS}
${CC} -o $@ ${OBJS}
${CC} -o $@ ${OBJS}
.c.o:
${CC} -c ${CFLAGS} $*.c -o $@
depend:
rm -f .depend
${CC} -MM ${CFLAGS} *.c >> .depend
clean:
rm -rf core ${TARGET} $(OBJS)
+5 -5
View File
@@ -14,28 +14,28 @@ SRCS = mso.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/indtext.c \
$(SRC_DIR)/proplist.c \
$(SRC_DIR)/lighting.c \
$(TEST_DIR)/ctest.c
TARGET = multistate_output
all: ${TARGET}
OBJS = ${SRCS:.c=.o}
${TARGET}: ${OBJS}
${CC} -o $@ ${OBJS}
${CC} -o $@ ${OBJS}
.c.o:
${CC} -c ${CFLAGS} $*.c -o $@
depend:
rm -f .depend
${CC} -MM ${CFLAGS} *.c >> .depend
clean:
rm -rf core ${TARGET} $(OBJS)
+1 -1
View File
@@ -14,8 +14,8 @@ SRCS = msv.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/proplist.c \
$(SRC_DIR)/lighting.c \
$(SRC_DIR)/indtext.c \
$(TEST_DIR)/ctest.c
+1
View File
@@ -129,6 +129,7 @@
defined(BACAPP_LIGHTING_COMMAND) || \
defined(BACAPP_DEVICE_OBJECT_PROP_REF) || \
defined(BACAPP_OBJECT_ID))
#define BACAPP_ALL
#endif
#if defined (BACAPP_ALL)
-1
View File
@@ -722,7 +722,6 @@ int main(
void)
{
Test *pTest;
bool rc;
pTest = ct_create("keylist", NULL);
testKeyList(pTest);
+1 -1
View File
@@ -131,7 +131,7 @@ key: logfile test/key.mak
( ./test/key >> ${LOGFILE} )
$(MAKE) -s -C test -f key.mak clean
lighting: lighting test/lighting.mak
lighting: logfile test/lighting.mak
$(MAKE) -s -C test -f lighting.mak clean all
( ./test/lighting >> ${LOGFILE} )
$(MAKE) -s -C test -f lighting.mak clean
+6 -5
View File
@@ -13,6 +13,7 @@ SRCS = $(SRC_DIR)/address.c \
$(SRC_DIR)/bacstr.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/lighting.c \
$(SRC_DIR)/bactext.c \
@@ -24,18 +25,18 @@ OBJS = ${SRCS:.c=.o}
TARGET = address
all: ${TARGET}
${TARGET}: ${OBJS}
${CC} -o $@ ${OBJS}
${CC} -o $@ ${OBJS}
.c.o:
${CC} -c ${CFLAGS} $*.c -o $@
depend:
rm -f .depend
${CC} -MM ${CFLAGS} *.c >> .depend
clean:
rm -rf ${TARGET} $(OBJS)
rm -rf ${TARGET} $(OBJS)
include: .depend
+1 -2
View File
@@ -4,8 +4,6 @@ CC = gcc
SRC_DIR = ../src
INCLUDES = -I../include -I.
DEFINES = -DBIG_ENDIAN=0 -DTEST -DTEST_BACNET_APPLICATION_DATA
DEFINES += -DBACAPP_ALL -DPRINT_ENABLED=1
CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g
SRCS = $(SRC_DIR)/bacdcode.c \
@@ -13,6 +11,7 @@ SRCS = $(SRC_DIR)/bacdcode.c \
$(SRC_DIR)/bacstr.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/lighting.c \
+6 -5
View File
@@ -1,7 +1,7 @@
#Makefile to build test case
CC = gcc
SRC_DIR = ../src
INCLUDES = -I../include -I. -I../demo/object
INCLUDES = -I../include -I. -I../demo/object
DEFINES = -DBIG_ENDIAN=0 -DTEST -DTEST_COV -DBACAPP_ALL
CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g
@@ -12,6 +12,7 @@ SRCS = $(SRC_DIR)/bacdcode.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/lighting.c \
$(SRC_DIR)/indtext.c \
$(SRC_DIR)/bactext.c \
@@ -23,17 +24,17 @@ OBJS = ${SRCS:.c=.o}
TARGET = cov
all: ${TARGET}
${TARGET}: ${OBJS}
${CC} -o $@ ${OBJS}
${CC} -o $@ ${OBJS}
.c.o:
${CC} -c ${CFLAGS} $*.c -o $@
depend:
rm -f .depend
${CC} -MM ${CFLAGS} *.c >> .depend
clean:
rm -rf core ${TARGET} $(OBJS) *.bak *.1 *.ini
+1
View File
@@ -12,6 +12,7 @@ SRCS = $(SRC_DIR)/datetime.c \
$(SRC_DIR)/bacstr.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/lighting.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/indtext.c \
+4 -4
View File
@@ -26,19 +26,19 @@ SRCS = $(SRC_DIR)/bacdcode.c \
TARGET = event
all: ${TARGET}
OBJS = ${SRCS:.c=.o}
${TARGET}: ${OBJS}
${CC} -o $@ ${OBJS}
${CC} -o $@ ${OBJS}
.c.o:
${CC} -c ${CFLAGS} $*.c -o $@
depend:
rm -f .depend
${CC} -MM ${CFLAGS} *.c >> .depend
clean:
rm -rf core ${TARGET} $(OBJS) *.bak *.1 *.ini
+5 -4
View File
@@ -11,6 +11,7 @@ SRCS = $(SRC_DIR)/bacdcode.c \
$(SRC_DIR)/bacstr.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/lighting.c \
$(SRC_DIR)/bactext.c \
@@ -22,19 +23,19 @@ SRCS = $(SRC_DIR)/bacdcode.c \
TARGET = getevent
all: ${TARGET}
OBJS = ${SRCS:.c=.o}
${TARGET}: ${OBJS}
${CC} -o $@ ${OBJS}
${CC} -o $@ ${OBJS}
.c.o:
${CC} -c ${CFLAGS} $*.c -o $@
depend:
rm -f .depend
${CC} -MM ${CFLAGS} *.c >> .depend
clean:
rm -rf core ${TARGET} $(OBJS) *.bak *.1 *.ini
+5 -5
View File
@@ -12,10 +12,10 @@ SRCS = $(SRC_DIR)/bacdcode.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/bacerror.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/indtext.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/proplist.c \
$(SRC_DIR)/lighting.c \
$(SRC_DIR)/memcopy.c \
$(SRC_DIR)/lso.c \
@@ -24,19 +24,19 @@ SRCS = $(SRC_DIR)/bacdcode.c \
TARGET = lso
all: ${TARGET}
OBJS = ${SRCS:.c=.o}
${TARGET}: ${OBJS}
${CC} -o $@ ${OBJS}
${CC} -o $@ ${OBJS}
.c.o:
${CC} -c ${CFLAGS} $*.c -o $@
depend:
rm -f .depend
${CC} -MM ${CFLAGS} *.c >> .depend
clean:
rm -rf core ${TARGET} $(OBJS) *.bak *.1 *.ini
+1
View File
@@ -3,6 +3,7 @@ CC = gcc
SRC_DIR = ../src
INCLUDES = -I../include -I.
DEFINES = -DBIG_ENDIAN=0 -DTEST -DTEST_PROPLIST
DEFINES += -DBACNET_PROPERTY_LISTS=1
CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g
+1
View File
@@ -8,6 +8,7 @@ CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g
SRCS = $(SRC_DIR)/bacdcode.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/indtext.c \
$(SRC_DIR)/bacint.c \
+5 -4
View File
@@ -12,6 +12,7 @@ SRCS = $(SRC_DIR)/bacdcode.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/bacerror.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/indtext.c \
$(SRC_DIR)/datetime.c \
@@ -23,19 +24,19 @@ SRCS = $(SRC_DIR)/bacdcode.c \
TARGET = rpm
all: ${TARGET}
OBJS = ${SRCS:.c=.o}
${TARGET}: ${OBJS}
${CC} -o $@ ${OBJS}
${CC} -o $@ ${OBJS}
.c.o:
${CC} -c ${CFLAGS} $*.c -o $@
depend:
rm -f .depend
${CC} -MM ${CFLAGS} *.c >> .depend
clean:
rm -rf core ${TARGET} $(OBJS) *.bak *.1 *.ini
+2 -1
View File
@@ -24,6 +24,7 @@ SRCS := $(SRC_DIR)/bacdcode.c \
$(SRC_DIR)/bacreal.c \
$(SRC_DIR)/bacerror.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/indtext.c \
$(SRC_DIR)/datetime.c \
@@ -34,7 +35,7 @@ SRCS := $(SRC_DIR)/bacdcode.c \
OBJS := ${SRCS:.c=.o}
all: ${TARGET}
${TARGET}: ${OBJS}
${CC} -o $@ ${OBJS}
+5 -4
View File
@@ -13,6 +13,7 @@ SRCS = $(SRC_DIR)/bacdcode.c \
$(SRC_DIR)/datetime.c \
$(SRC_DIR)/lighting.c \
$(SRC_DIR)/bacapp.c \
$(SRC_DIR)/bacdevobjpropref.c \
$(SRC_DIR)/bactext.c \
$(SRC_DIR)/indtext.c \
$(SRC_DIR)/wp.c \
@@ -21,19 +22,19 @@ SRCS = $(SRC_DIR)/bacdcode.c \
TARGET = wp
all: ${TARGET}
OBJS = ${SRCS:.c=.o}
${TARGET}: ${OBJS}
${CC} -o $@ ${OBJS}
${CC} -o $@ ${OBJS}
.c.o:
${CC} -c ${CFLAGS} $*.c -o $@
depend:
rm -f .depend
${CC} -MM ${CFLAGS} *.c >> .depend
clean:
rm -rf core ${TARGET} $(OBJS) *.bak *.1 *.ini