Skip to content

Commit da0c5d9

Browse files
author
Cruz Monrreal
authored
Merge pull request #8182 from lorjala/fix_unittests
Unit tests: fix cellular athandler unit tests and wait() declaration conflict
2 parents caa4279 + 60bb9b7 commit da0c5d9

File tree

3 files changed

+38
-3
lines changed

3 files changed

+38
-3
lines changed

UNITTESTS/features/cellular/framework/AT/athandler/athandlertest.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,7 @@ TEST_F(TestATHandler, test_ATHandler_read_string)
618618
// *** Reading more than available in buffer ***
619619
at.clear_error();
620620
char table4[] = "\"s,\"OK\r\n\0";
621+
mbed_poll_stub::int_value = 0;
621622
at.flush();
622623
filehandle_stub_table = table4;
623624
filehandle_stub_table_pos = 0;
@@ -741,6 +742,7 @@ TEST_F(TestATHandler, test_ATHandler_read_string)
741742
// *** CRLF part of the string ***
742743
at.clear_error();
743744
char table10[] = "\"s\"\r\nOK\r\n\0";
745+
mbed_poll_stub::int_value = 0;
744746
at.flush();
745747
filehandle_stub_table = table10;
746748
filehandle_stub_table_pos = 0;

UNITTESTS/target_h/platform/mbed_retarget.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,9 +324,9 @@ struct statvfs {
324324
unsigned long f_bsize; ///< Filesystem block size
325325
unsigned long f_frsize; ///< Fragment size (block size)
326326

327-
fsblkcnt_t f_blocks; ///< Number of blocks
328-
fsblkcnt_t f_bfree; ///< Number of free blocks
329-
fsblkcnt_t f_bavail; ///< Number of free blocks for unprivileged users
327+
unsigned long long f_blocks; ///< Number of blocks
328+
unsigned long long f_bfree; ///< Number of free blocks
329+
unsigned long long f_bavail; ///< Number of free blocks for unprivileged users
330330

331331
unsigned long f_fsid; ///< Filesystem ID
332332

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
2+
/* mbed Microcontroller Library
3+
* Copyright (c) 2018 ARM Limited
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+
#ifndef MBED_WAIT_API_H
18+
#define MBED_WAIT_API_H
19+
20+
#ifdef __cplusplus
21+
extern "C" {
22+
#endif
23+
24+
void wait_ms(int ms);
25+
26+
void wait_us(int us);
27+
28+
#ifdef __cplusplus
29+
}
30+
#endif
31+
32+
#endif
33+

0 commit comments

Comments
 (0)