Skip to content

Commit 83fc2e2

Browse files
authored
Merge pull request #8176 from AnttiKauppila/ut_fix
CellularDevice_stub added
2 parents b71f340 + 4f97eae commit 83fc2e2

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

UNITTESTS/features/cellular/framework/AT/at_cellulardevice/unittest.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,5 @@ set(unittest-test-sources
3232
stubs/EventQueue_stub.cpp
3333
stubs/FileHandle_stub.cpp
3434
stubs/mbed_assert_stub.cpp
35+
stubs/CellularDevice_stub.cpp
3536
)
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright (c) , Arm Limited and affiliates.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*
5+
* Licensed under the Apache License, Version 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* http://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
#include "CellularDevice.h"
19+
#include "EventQueue.h"
20+
#include "CellularUtil.h"
21+
22+
namespace mbed {
23+
24+
MBED_WEAK CellularDevice *CellularDevice::get_default_instance()
25+
{
26+
return NULL;
27+
}
28+
29+
CellularDevice::CellularDevice() : _network_ref_count(0), _sms_ref_count(0), _power_ref_count(0), _sim_ref_count(0),
30+
_info_ref_count(0)
31+
{
32+
}
33+
34+
events::EventQueue *CellularDevice::get_queue() const
35+
{
36+
return NULL;
37+
}
38+
39+
}

0 commit comments

Comments
 (0)