Fixed load control object and unit test. Added recipe to Makefile for Zephyr OS twister unit testing. (#710)
This commit is contained in:
@@ -27,7 +27,7 @@ add_compile_definitions(
|
||||
|
||||
include_directories(
|
||||
${SRC_DIR}
|
||||
${TST_DIR}/bacnet/basic/object
|
||||
${TST_DIR}/bacnet/basic/object/test
|
||||
${TST_DIR}/ztest/include
|
||||
)
|
||||
|
||||
@@ -64,9 +64,9 @@ add_executable(${PROJECT_NAME}
|
||||
${SRC_DIR}/bacnet/special_event.c
|
||||
# Test and test library files
|
||||
./src/main.c
|
||||
./stubs.c
|
||||
../mock/device_mock.c
|
||||
../property_test.c
|
||||
${TST_DIR}/bacnet/basic/object/test/datetime_local.c
|
||||
${TST_DIR}/bacnet/basic/object/test/device_mock.c
|
||||
${TST_DIR}/bacnet/basic/object/test/property_test.c
|
||||
${ZTST_DIR}/ztest_mock.c
|
||||
${ZTST_DIR}/ztest.c
|
||||
)
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
* @brief Stub functions for unit test of a BACnet object
|
||||
* @author Steve Karg <skarg@users.sourceforge.net>
|
||||
* @date December 2022
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "bacnet/datetime.h"
|
||||
|
||||
bool datetime_local(
|
||||
BACNET_DATE *bdate,
|
||||
BACNET_TIME *btime,
|
||||
int16_t *utc_offset_minutes,
|
||||
bool *dst_active)
|
||||
{
|
||||
bdate->year = 2023;
|
||||
bdate->month = 6;
|
||||
bdate->day = 26;
|
||||
bdate->wday = 1;
|
||||
|
||||
(void)btime;
|
||||
(void)utc_offset_minutes;
|
||||
(void)dst_active;
|
||||
return true;
|
||||
}
|
||||
Reference in New Issue
Block a user