mirror of https://github.com/ARMmbed/mbed-os.git
IOTCELL-553 fixed
Unittests reports an error as there is no coverage file created for cellular_mux. This is now fixed by running an init function.pull/6082/head
parent
fb25c600e7
commit
427674d6ca
|
@ -10,6 +10,12 @@ TEST_SRC_FILES = \
|
|||
main.cpp \
|
||||
cellular_muxtest.cpp \
|
||||
test_cellular_mux.cpp \
|
||||
../../stubs/mbed_assert_stub.cpp \
|
||||
../../stubs/FileHandle_stub.cpp \
|
||||
../../stubs/EventQueue_stub.cpp \
|
||||
../../stubs/equeue_stub.c \
|
||||
../../stubs/cellular_mux_data_service_stub.cpp \
|
||||
../../stubs/Semaphore_stub.cpp \
|
||||
|
||||
include ../../MakefileWorker.mk
|
||||
|
||||
|
|
|
@ -37,6 +37,29 @@ TEST(cellular_mux, Create)
|
|||
CHECK(unit != NULL);
|
||||
}
|
||||
|
||||
|
||||
TEST(cellular_mux, test_cellular_mux_module_init)
|
||||
{
|
||||
unit->test_cellular_mux_module_init();
|
||||
}
|
||||
|
||||
TEST(cellular_mux, test_cellular_mux_mux_start)
|
||||
{
|
||||
unit->test_cellular_mux_mux_start();
|
||||
}
|
||||
|
||||
TEST(cellular_mux, test_cellular_mux_dlci_establish)
|
||||
{
|
||||
unit->test_cellular_mux_dlci_establish();
|
||||
}
|
||||
|
||||
TEST(cellular_mux, test_cellular_mux_serial_attach)
|
||||
{
|
||||
unit->test_cellular_mux_serial_attach();
|
||||
}
|
||||
|
||||
TEST(cellular_mux, test_cellular_mux_eventqueue_attach)
|
||||
{
|
||||
unit->test_cellular_mux_eventqueue_attach();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -16,8 +16,12 @@
|
|||
*/
|
||||
#include "CppUTest/TestHarness.h"
|
||||
#include "test_cellular_mux.h"
|
||||
#include "cellular_mux.h"
|
||||
#include <string.h>
|
||||
|
||||
using namespace mbed;
|
||||
using namespace events;
|
||||
|
||||
Test_cellular_mux::Test_cellular_mux()
|
||||
{
|
||||
|
||||
|
@ -27,3 +31,27 @@ Test_cellular_mux::~Test_cellular_mux()
|
|||
{
|
||||
}
|
||||
|
||||
void Test_cellular_mux::test_cellular_mux_module_init()
|
||||
{
|
||||
Mux::module_init();
|
||||
}
|
||||
|
||||
void Test_cellular_mux::test_cellular_mux_mux_start()
|
||||
{
|
||||
}
|
||||
|
||||
void Test_cellular_mux::test_cellular_mux_dlci_establish()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Test_cellular_mux::test_cellular_mux_serial_attach()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Test_cellular_mux::test_cellular_mux_eventqueue_attach()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -23,6 +23,16 @@ public:
|
|||
Test_cellular_mux();
|
||||
|
||||
virtual ~Test_cellular_mux();
|
||||
|
||||
void test_cellular_mux_module_init();
|
||||
|
||||
void test_cellular_mux_mux_start();
|
||||
|
||||
void test_cellular_mux_dlci_establish();
|
||||
|
||||
void test_cellular_mux_serial_attach();
|
||||
|
||||
void test_cellular_mux_eventqueue_attach();
|
||||
};
|
||||
|
||||
#endif // TEST_cellular_mux_H
|
||||
|
|
|
@ -17,4 +17,41 @@
|
|||
|
||||
#include "Semaphore.h"
|
||||
|
||||
namespace rtos {
|
||||
|
||||
Semaphore::Semaphore(int32_t count)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Semaphore::Semaphore(int32_t count, uint16_t max_count)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void Semaphore::constructor(int32_t count, uint16_t max_count)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
int32_t Semaphore::wait(uint32_t millisec)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int32_t Semaphore::wait_until(uint64_t millisec)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
osStatus Semaphore::release(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
Semaphore::~Semaphore()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -14,7 +14,37 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
namespace rtos {
|
||||
class Semaphore {
|
||||
};
|
||||
#include "cellular_mux.h"
|
||||
|
||||
namespace mbed
|
||||
{
|
||||
|
||||
ssize_t MuxDataService::write(const void* buffer, size_t size)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
ssize_t MuxDataService::read(void *buffer, size_t size)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
off_t MuxDataService::seek(off_t offset, int whence)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
int MuxDataService::close()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void MuxDataService::sigio(Callback<void()> func)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue