Skip to content

Unit tests: fix cellular athandler unit tests and wait() declaration conflict #8182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,7 @@ TEST_F(TestATHandler, test_ATHandler_read_string)
// *** Reading more than available in buffer ***
at.clear_error();
char table4[] = "\"s,\"OK\r\n\0";
mbed_poll_stub::int_value = 0;
at.flush();
filehandle_stub_table = table4;
filehandle_stub_table_pos = 0;
Expand Down Expand Up @@ -741,6 +742,7 @@ TEST_F(TestATHandler, test_ATHandler_read_string)
// *** CRLF part of the string ***
at.clear_error();
char table10[] = "\"s\"\r\nOK\r\n\0";
mbed_poll_stub::int_value = 0;
at.flush();
filehandle_stub_table = table10;
filehandle_stub_table_pos = 0;
Expand Down
6 changes: 3 additions & 3 deletions UNITTESTS/target_h/platform/mbed_retarget.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,9 @@ struct statvfs {
unsigned long f_bsize; ///< Filesystem block size
unsigned long f_frsize; ///< Fragment size (block size)

fsblkcnt_t f_blocks; ///< Number of blocks
fsblkcnt_t f_bfree; ///< Number of free blocks
fsblkcnt_t f_bavail; ///< Number of free blocks for unprivileged users
unsigned long long f_blocks; ///< Number of blocks
unsigned long long f_bfree; ///< Number of free blocks
unsigned long long f_bavail; ///< Number of free blocks for unprivileged users

unsigned long f_fsid; ///< Filesystem ID

Expand Down
33 changes: 33 additions & 0 deletions UNITTESTS/target_h/platform/mbed_wait_api.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@

/* mbed Microcontroller Library
* Copyright (c) 2018 ARM Limited
*
* 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.
*/
#ifndef MBED_WAIT_API_H
#define MBED_WAIT_API_H

#ifdef __cplusplus
extern "C" {
#endif

void wait_ms(int ms);

void wait_us(int us);

#ifdef __cplusplus
}
#endif

#endif