Skip to content

Commit

Permalink
Unit test for llc data service.
Browse files Browse the repository at this point in the history
  • Loading branch information
Juha Heiskanen authored and juhhei01 committed Feb 13, 2018
1 parent ffb3639 commit 5af7992
Show file tree
Hide file tree
Showing 5 changed files with 592 additions and 0 deletions.
38 changes: 38 additions & 0 deletions test/nanostack/unittest/6LoWPAN/ws_llc_data_service/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
include ../../makefile_defines.txt

COMPONENT_NAME = ws_llc_data_service_unit

#This must be changed manually
SRC_FILES = \
../../../../../source/6LoWPAN/ws/ws_llc_data_service.c

TEST_SRC_FILES = \
main.cpp \
ws_llc_data_servicetest.cpp \
test_ws_llc_data_service.c \
../../stub/common_functions_stub.c \
../../stub/nsdynmemLIB_stub.c \
../../stub/ns_list_stub.c \
../../stub/mbed_trace_stub.c \
../../stub/platform_stub.c \
../../stub/address_stub.c \
../../stub/etx_stub.c \
../../stub/protocol_stats_stub.c \
../../stub/randLIB_stub.c \
../../stub/mesh_stub.c \
../../stub/nsdynmemLIB_stub.c \
../../stub/mbed_trace_stub.c \
../../stub/buffer_dyn_stub.c \
../../stub/protocol_core_stub.c \
../../stub/socket_stub.c \
../../stub/adaptation_interface_stub.c \
../../stub/mac_ie_lib_stub.c \
../../stub/ws_ie_lib_stub.c \
../../stub/ws_mpx_header_stub.c \
../../stub/iphc_decompress_stub.c \


include ../../MakefileWorker.mk

CPPUTESTFLAGS += -DFEA_TRACE_SUPPORT

28 changes: 28 additions & 0 deletions test/nanostack/unittest/6LoWPAN/ws_llc_data_service/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright (c) 2016, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

#include "CppUTest/CommandLineTestRunner.h"
#include "CppUTest/TestPlugin.h"
#include "CppUTest/TestRegistry.h"
#include "CppUTestExt/MockSupportPlugin.h"
int main(int ac, char** av)
{
return CommandLineTestRunner::RunAllTests(ac, av);
}

IMPORT_TEST_GROUP(ws_llc_data_service);

Loading

0 comments on commit 5af7992

Please sign in to comment.