From 6533c98983613cec4d400bbd13062e0e715fb1e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Teppo=20J=C3=A4rvelin?= Date: Thu, 12 Apr 2018 15:38:35 +0300 Subject: [PATCH] Cellular: fixed athandler unit tests. --- .../cellular/UNITTESTS/at/athandler/Makefile | 1 + .../UNITTESTS/stubs/ATHandler_stub.cpp | 2 +- features/cellular/UNITTESTS/stubs/Kernel.cpp | 25 +++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 features/cellular/UNITTESTS/stubs/Kernel.cpp diff --git a/features/cellular/UNITTESTS/at/athandler/Makefile b/features/cellular/UNITTESTS/at/athandler/Makefile index c0bc7b422b..a6e84a8f6a 100644 --- a/features/cellular/UNITTESTS/at/athandler/Makefile +++ b/features/cellular/UNITTESTS/at/athandler/Makefile @@ -20,6 +20,7 @@ TEST_SRC_FILES = \ ../../stubs/mbed_poll_stub.cpp \ ../../stubs/Timer_stub.cpp \ ../../stubs/equeue_stub.cpp \ + ../../stubs/Kernel.cpp \ include ../../MakefileWorker.mk diff --git a/features/cellular/UNITTESTS/stubs/ATHandler_stub.cpp b/features/cellular/UNITTESTS/stubs/ATHandler_stub.cpp index 0814e83483..c07a550ee1 100644 --- a/features/cellular/UNITTESTS/stubs/ATHandler_stub.cpp +++ b/features/cellular/UNITTESTS/stubs/ATHandler_stub.cpp @@ -42,7 +42,7 @@ device_err_t ATHandler_stub::device_err_value; Callback ATHandler_stub::callback = NULL; uint8_t ATHandler_stub::resp_info_true_counter = false; -ATHandler::ATHandler(FileHandle *fh, EventQueue &queue, int timeout, const char *output_delimiter) : +ATHandler::ATHandler(FileHandle *fh, EventQueue &queue, int timeout, const char *output_delimiter, uint16_t send_delay) : _nextATHandler(0), _fileHandle(fh), _queue(queue) diff --git a/features/cellular/UNITTESTS/stubs/Kernel.cpp b/features/cellular/UNITTESTS/stubs/Kernel.cpp new file mode 100644 index 0000000000..ecfa1d80af --- /dev/null +++ b/features/cellular/UNITTESTS/stubs/Kernel.cpp @@ -0,0 +1,25 @@ +/* + * Copyright (c) , 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 "Kernel.h" + +namespace rtos { + +uint64_t Kernel::get_ms_count() +{ + return 20; +} +}