Added datetime to unit tests that depended on it.
This commit is contained in:
@@ -765,12 +765,14 @@ bool bacapp_same_value(BACNET_APPLICATION_DATA_VALUE * value,
|
||||
status = false;
|
||||
break;
|
||||
case BACNET_APPLICATION_TAG_DATE:
|
||||
status = bacapp_same_date(&test_value->type.Date,
|
||||
&value->type.Date);
|
||||
if (datetime_compare_date(&test_value->type.Date,
|
||||
&value->type.Date) != 0)
|
||||
status = false;
|
||||
break;
|
||||
case BACNET_APPLICATION_TAG_TIME:
|
||||
status = bacapp_same_time(&test_value->type.Time,
|
||||
&value->type.Time);
|
||||
if (datetime_compare_time(&test_value->type.Time,
|
||||
&value->type.Time) != 0)
|
||||
status = false;
|
||||
break;
|
||||
case BACNET_APPLICATION_TAG_OBJECT_ID:
|
||||
if (test_value->type.Object_Id.type !=
|
||||
|
||||
@@ -9,7 +9,7 @@ CFLAGS = -Wall -I. -Itest -DTEST -DTEST_BACNET_APPLICATION_DATA -g
|
||||
SRCS = bacdcode.c \
|
||||
bacstr.c \
|
||||
bacapp.c \
|
||||
bigend.c \
|
||||
datetime.c \
|
||||
bactext.c \
|
||||
indtext.c \
|
||||
test/ctest.c
|
||||
|
||||
@@ -8,7 +8,7 @@ CFLAGS = -Wall -I. -Itest -Idemo/object -DTEST -DTEST_COV -g
|
||||
|
||||
SRCS = bacdcode.c \
|
||||
bacstr.c \
|
||||
bigend.c \
|
||||
datetime.c \
|
||||
bacapp.c \
|
||||
indtext.c \
|
||||
bactext.c \
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
License.
|
||||
-------------------------------------------
|
||||
####COPYRIGHTEND####*/
|
||||
#ifndef DATETIME_H
|
||||
#define DATETIME_H
|
||||
#ifndef DATE_TIME_H
|
||||
#define DATE_TIME_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
@@ -67,10 +67,10 @@ extern "C" {
|
||||
uint16_t year, uint8_t month, uint8_t day);
|
||||
void datetime_set_time(BACNET_TIME * btime,
|
||||
uint8_t hour, uint8_t minute, uint8_t seconds, uint8_t hundredths);
|
||||
void datetime_set_datetime(BACNET_DATE_TIME * bdatetime,
|
||||
void datetime_set(BACNET_DATE_TIME * bdatetime,
|
||||
BACNET_DATE * bdate,
|
||||
BACNET_TIME * btime);
|
||||
void datetime_set_datetime_values(BACNET_DATE_TIME * bdatetime,
|
||||
void datetime_set_values(BACNET_DATE_TIME * bdatetime,
|
||||
uint16_t year, uint8_t month, uint8_t day,
|
||||
uint8_t hour, uint8_t minute, uint8_t seconds, uint8_t hundredths);
|
||||
|
||||
@@ -78,16 +78,16 @@ extern "C" {
|
||||
if the date/times are the same, return is 0
|
||||
if date1 is before date2, returns negative
|
||||
if date1 is after date2, returns positive */
|
||||
int datetime_date_compare(BACNET_DATE * date1, BACNET_DATE * date2);
|
||||
int datetime_time_compare(BACNET_TIME * time1, BACNET_TIME * time2);
|
||||
int datetime_datetime_compare(
|
||||
int datetime_compare_date(BACNET_DATE * date1, BACNET_DATE * date2);
|
||||
int datetime_compare_time(BACNET_TIME * time1, BACNET_TIME * time2);
|
||||
int datetime_compare(
|
||||
BACNET_DATE_TIME * datetime1,
|
||||
BACNET_DATE_TIME * datetime2);
|
||||
|
||||
/* utility copy functions */
|
||||
void datetime_copy_date(BACNET_DATE * date1, BACNET_DATE * date2);
|
||||
void datetime_copy_time(BACNET_TIME * time1, BACNET_TIME * time2);
|
||||
void datetime_copy_datetime(
|
||||
void datetime_copy(
|
||||
BACNET_DATE_TIME * datetime1,
|
||||
BACNET_DATE_TIME * datetime2);
|
||||
|
||||
@@ -95,5 +95,5 @@ extern "C" {
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* DATETIME_H */
|
||||
#endif /* DATE_TIME_H */
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ CFLAGS = -Wall -I. -Itest -DTEST -DTEST_ANALOG_OUTPUT -g
|
||||
# NOTE: this file is normally called by the unittest.sh from up directory
|
||||
SRCS = bacdcode.c \
|
||||
bacstr.c \
|
||||
bigend.c \
|
||||
datetime.c \
|
||||
bacapp.c \
|
||||
bactext.c \
|
||||
indtext.c \
|
||||
|
||||
@@ -9,7 +9,7 @@ CFLAGS = -Wall -I. -Itest -DTEST -DTEST_ANALOG_VALUE -g
|
||||
# NOTE: this file is normally called by the unittest.sh from up directory
|
||||
SRCS = bacdcode.c \
|
||||
bacstr.c \
|
||||
bigend.c \
|
||||
datetime.c \
|
||||
bacapp.c \
|
||||
bactext.c \
|
||||
indtext.c \
|
||||
|
||||
@@ -9,7 +9,7 @@ CFLAGS = -Wall -I. -Itest -DTEST -DTEST_BINARY_OUTPUT -g
|
||||
# NOTE: this file is normally called by the unittest.sh from up directory
|
||||
SRCS = bacdcode.c \
|
||||
bacstr.c \
|
||||
bigend.c \
|
||||
datetime.c \
|
||||
bacapp.c \
|
||||
bactext.c \
|
||||
indtext.c \
|
||||
|
||||
@@ -9,7 +9,7 @@ CFLAGS = -Wall -I. -Itest -DTEST -DTEST_BINARY_VALUE -g
|
||||
# NOTE: this file is normally called by the unittest.sh from up directory
|
||||
SRCS = bacdcode.c \
|
||||
bacstr.c \
|
||||
bigend.c \
|
||||
datetime.c \
|
||||
bacapp.c \
|
||||
bactext.c \
|
||||
indtext.c \
|
||||
|
||||
@@ -8,7 +8,7 @@ CFLAGS = -Wall -I. -Itest -DTEST -DTEST_DEVICE -g
|
||||
|
||||
# NOTE: this file is normally called by the unittest.sh from up directory
|
||||
SRCS = bacdcode.c \
|
||||
bigend.c \
|
||||
datetime.c \
|
||||
bacstr.c \
|
||||
bacapp.c \
|
||||
bactext.c \
|
||||
|
||||
@@ -9,7 +9,7 @@ CFLAGS = -Wall -I. -Itest -DTEST -DTEST_LOAD_CONTROL -g
|
||||
# NOTE: this file is normally called by the unittest.sh from up directory
|
||||
SRCS = bacdcode.c \
|
||||
bacstr.c \
|
||||
bigend.c \
|
||||
datetime.c \
|
||||
demo/object/lc.c \
|
||||
test/ctest.c
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ CFLAGS = -Wall -I. -Itest -DTEST -DTEST_LIFE_SAFETY_POINT -g
|
||||
# NOTE: this file is normally called by the unittest.sh from up directory
|
||||
SRCS = bacdcode.c \
|
||||
bacstr.c \
|
||||
bigend.c \
|
||||
datetime.c \
|
||||
bacapp.c \
|
||||
bactext.c \
|
||||
indtext.c \
|
||||
|
||||
@@ -9,7 +9,7 @@ CFLAGS = -Wall -I. -Itest -DTEST -DTEST_MULTISTATE_OUTPUT -g
|
||||
# NOTE: this file is normally called by the unittest.sh from up directory
|
||||
SRCS = bacdcode.c \
|
||||
bacstr.c \
|
||||
bigend.c \
|
||||
datetime.c \
|
||||
bacapp.c \
|
||||
bactext.c \
|
||||
indtext.c \
|
||||
|
||||
@@ -12,7 +12,7 @@ SRCS = bacdcode.c \
|
||||
bactext.c \
|
||||
indtext.c \
|
||||
bacstr.c \
|
||||
bigend.c \
|
||||
datetime.c \
|
||||
rpm.c \
|
||||
test/ctest.c
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g
|
||||
SRCS = address.c \
|
||||
bacdcode.c \
|
||||
bacstr.c \
|
||||
bigend.c \
|
||||
datetime.c \
|
||||
bacapp.c \
|
||||
bactext.c \
|
||||
indtext.c \
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ CFLAGS = -Wall $(INCLUDES) $(DEFINES) -g
|
||||
|
||||
SRCS = bacdcode.c \
|
||||
bacstr.c \
|
||||
bigend.c \
|
||||
datetime.c \
|
||||
bacapp.c \
|
||||
bactext.c \
|
||||
indtext.c \
|
||||
|
||||
Reference in New Issue
Block a user