mirror of https://github.com/ARMmbed/mbed-os.git
Move storgae unittests
parent
9aec1012a0
commit
d47689be8e
|
@ -1,20 +0,0 @@
|
|||
|
||||
####################
|
||||
# UNIT TESTS
|
||||
####################
|
||||
|
||||
set(unittest-includes ${unittest-includes}
|
||||
.
|
||||
..
|
||||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/ChainingBlockDevice.cpp
|
||||
../storage/blockdevice/HeapBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
storage/blockdevice/ChainingBlockDevice/test_ChainingBlockDevice.cpp
|
||||
)
|
|
@ -0,0 +1 @@
|
|||
*
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "storage/blockdevice/BufferedBlockDevice.h"
|
||||
#include "blockdevice/BufferedBlockDevice.h"
|
||||
#include "stubs/BlockDevice_mock.h"
|
||||
|
||||
using ::testing::_;
|
|
@ -9,12 +9,11 @@ set(unittest-includes ${unittest-includes}
|
|||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/BufferedBlockDevice.cpp
|
||||
../storage/blockdevice/source/BufferedBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
storage/blockdevice/BufferedBlockDevice/test_BufferedBlockDevice.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/test_BufferedBlockDevice.cpp
|
||||
stubs/BlockDevice_mock.h
|
||||
)
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "storage/blockdevice/ChainingBlockDevice.cpp"
|
||||
#include "ChainingBlockDevice.cpp"
|
||||
#include "stubs/BlockDevice_mock.h"
|
||||
|
||||
using ::testing::_;
|
||||
|
@ -160,4 +160,3 @@ TEST_F(ChainingBlockModuleTest, memory_overlap)
|
|||
|
||||
EXPECT_EQ(bd.erase((SECTORS_NUM / 2 - 2) * BLOCK_SIZE, 4 * BLOCK_SIZE), BD_ERROR_OK);
|
||||
}
|
||||
|
|
@ -6,15 +6,16 @@
|
|||
set(unittest-includes ${unittest-includes}
|
||||
.
|
||||
..
|
||||
../storage/blockdevice/source
|
||||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/SlicingBlockDevice.cpp
|
||||
../storage/blockdevice/HeapBlockDevice.cpp
|
||||
../storage/blockdevice/source/ChainingBlockDevice.cpp
|
||||
../storage/blockdevice/source/HeapBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
moduletests/storage/blockdevice/SlicingBlockDevice/moduletest.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/test_ChainingBlockDevice.cpp
|
||||
)
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "storage/blockdevice/ExhaustibleBlockDevice.h"
|
||||
#include "blockdevice/ExhaustibleBlockDevice.h"
|
||||
#include "stubs/BlockDevice_mock.h"
|
||||
|
||||
#define BLOCK_SIZE (512)
|
|
@ -9,11 +9,11 @@ set(unittest-includes ${unittest-includes}
|
|||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/FlashSimBlockDevice.cpp
|
||||
../storage/blockdevice/source/ExhaustibleBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
storage/blockdevice/FlashSimBlockDevice/test_FlashSimBlockDevice.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/test_ExhaustibleBlockDevice.cpp
|
||||
)
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "storage/blockdevice/FlashSimBlockDevice.h"
|
||||
#include "blockdevice/FlashSimBlockDevice.h"
|
||||
#include "stubs/BlockDevice_mock.h"
|
||||
|
||||
#define BLOCK_SIZE (512)
|
|
@ -9,11 +9,11 @@ set(unittest-includes ${unittest-includes}
|
|||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/ExhaustibleBlockDevice.cpp
|
||||
../storage/blockdevice/source/FlashSimBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
storage/blockdevice/ExhaustibleBlockDevice/test_ExhaustibleBlockDevice.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/test_FlashSimBlockDevice.cpp
|
||||
)
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "storage/blockdevice/HeapBlockDevice.h"
|
||||
#include "blockdevice/HeapBlockDevice.h"
|
||||
#include <string.h>
|
||||
#include "mbed_assert.h"
|
||||
|
|
@ -6,16 +6,17 @@
|
|||
set(unittest-includes ${unittest-includes}
|
||||
.
|
||||
..
|
||||
../storage/blockdevice/include
|
||||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/HeapBlockDevice.cpp
|
||||
../storage/blockdevice/source/HeapBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
storage/blockdevice/HeapBlockDevice/test.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/test.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-flags
|
|
@ -15,7 +15,7 @@
|
|||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "storage/blockdevice/MBRBlockDevice.h"
|
||||
#include "blockdevice/MBRBlockDevice.h"
|
||||
#include "stubs/BlockDevice_mock.h"
|
||||
|
||||
#define BLOCK_SIZE (512)
|
|
@ -9,11 +9,11 @@ set(unittest-includes ${unittest-includes}
|
|||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/MBRBlockDevice.cpp
|
||||
../storage/blockdevice/source/MBRBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
storage/blockdevice/MBRBlockDevice/test_MBRBlockDevice.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/test_MBRBlockDevice.cpp
|
||||
)
|
|
@ -15,8 +15,8 @@
|
|||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "storage/blockdevice/ObservingBlockDevice.h"
|
||||
#include "storage/blockdevice/ReadOnlyBlockDevice.h"
|
||||
#include "blockdevice/ObservingBlockDevice.h"
|
||||
#include "blockdevice/ReadOnlyBlockDevice.h"
|
||||
#include "stubs/BlockDevice_mock.h"
|
||||
|
||||
using ::testing::_;
|
|
@ -9,14 +9,14 @@ set(unittest-includes ${unittest-includes}
|
|||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/ObservingBlockDevice.cpp
|
||||
../storage/blockdevice/ReadOnlyBlockDevice.cpp
|
||||
../storage/blockdevice/source/ObservingBlockDevice.cpp
|
||||
../storage/blockdevice/source/ReadOnlyBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
stubs/mbed_error.c
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
storage/blockdevice/ObservingBlockDevice/test_ObservingBlockDevice.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/test_ObservingBlockDevice.cpp
|
||||
stubs/BlockDevice_mock.h
|
||||
)
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include "gtest/gtest.h"
|
||||
#include "stubs/BlockDevice_mock.h"
|
||||
#include "storage/blockdevice/ProfilingBlockDevice.h"
|
||||
#include "blockdevice/ProfilingBlockDevice.h"
|
||||
|
||||
#define BLOCK_SIZE (512)
|
||||
#define DEVICE_SIZE (BLOCK_SIZE*10)
|
|
@ -9,13 +9,13 @@ set(unittest-includes ${unittest-includes}
|
|||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/ProfilingBlockDevice.cpp
|
||||
../storage/blockdevice/HeapBlockDevice.cpp
|
||||
../storage/blockdevice/source/ProfilingBlockDevice.cpp
|
||||
../storage/blockdevice/source/HeapBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
storage/blockdevice/ProfilingBlockDevice/test_ProfilingBlockDevice.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/test_ProfilingBlockDevice.cpp
|
||||
stubs/mbed_error.c
|
||||
)
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
#include "gtest/gtest.h"
|
||||
#include "stubs/BlockDevice_mock.h"
|
||||
#include "storage/blockdevice/ReadOnlyBlockDevice.h"
|
||||
#include "blockdevice/ReadOnlyBlockDevice.h"
|
||||
#include "platform/mbed_error.h"
|
||||
|
||||
#define BLOCK_SIZE (512)
|
|
@ -9,13 +9,13 @@ set(unittest-includes ${unittest-includes}
|
|||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/ReadOnlyBlockDevice.cpp
|
||||
../storage/blockdevice/HeapBlockDevice.cpp
|
||||
../storage/blockdevice/source/ReadOnlyBlockDevice.cpp
|
||||
../storage/blockdevice/source/HeapBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
storage/blockdevice/ReadOnlyBlockDevice/test_ReadOnlyBlockDevice.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/test_ReadOnlyBlockDevice.cpp
|
||||
stubs/mbed_error.c
|
||||
)
|
|
@ -15,8 +15,8 @@
|
|||
*/
|
||||
|
||||
#include "gtest/gtest.h"
|
||||
#include "storage/blockdevice/HeapBlockDevice.h"
|
||||
#include "storage/blockdevice/SlicingBlockDevice.h"
|
||||
#include "blockdevice/HeapBlockDevice.h"
|
||||
#include "blockdevice/SlicingBlockDevice.h"
|
||||
|
||||
#define BLOCK_SIZE (512)
|
||||
#define DEVICE_SIZE (BLOCK_SIZE*10)
|
|
@ -0,0 +1,20 @@
|
|||
|
||||
####################
|
||||
# UNIT TESTS
|
||||
####################
|
||||
|
||||
set(unittest-includes ${unittest-includes}
|
||||
.
|
||||
..
|
||||
)
|
||||
|
||||
set(unittest-sources
|
||||
../storage/blockdevice/source/SlicingBlockDevice.cpp
|
||||
../storage/blockdevice/source/HeapBlockDevice.cpp
|
||||
stubs/mbed_atomic_stub.c
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
||||
|
||||
set(unittest-test-sources
|
||||
${CMAKE_CURRENT_LIST_DIR}/moduletest.cpp
|
||||
)
|
Loading…
Reference in New Issue