mirror of https://github.com/ARMmbed/mbed-os.git
SFDP: unit tests: Move unshared test data into case
Some test data in test_sfdp.cpp is used by one test case only, so we turn it into a local variable.pull/14989/head
parent
b5e7dd9d32
commit
50183d2ee4
|
@ -39,26 +39,6 @@ static const uint8_t sector_map_single_descriptor[] {
|
|||
0xF4, 0xFF, 0xFB, 0x03 // region 2
|
||||
};
|
||||
|
||||
/**
|
||||
* Based on Cypress S25FS512S, modified to have one descriptor,
|
||||
* twelve regions for test purpose.
|
||||
*/
|
||||
static const uint8_t sector_map_single_descriptor_twelve_regions[] {
|
||||
0xFF, 0x01, 0x0B, 0xFF, // header, highest region = 0x0B
|
||||
0xF1, 0x7F, 0x00, 0x00, // region 0
|
||||
0xF4, 0x7F, 0x03, 0x00, // region 1
|
||||
0xF4, 0xFF, 0xFB, 0x03, // region 2
|
||||
0xF1, 0x7F, 0x00, 0x00, // region 3
|
||||
0xF4, 0x7F, 0x03, 0x00, // region 4
|
||||
0xF4, 0xFF, 0xFB, 0x03, // region 5
|
||||
0xF1, 0x7F, 0x00, 0x00, // region 6
|
||||
0xF4, 0x7F, 0x03, 0x00, // region 7
|
||||
0xF4, 0xFF, 0xFB, 0x03, // region 8
|
||||
0xF1, 0x7F, 0x00, 0x00, // region 9
|
||||
0xF4, 0x7F, 0x03, 0x00, // region 10
|
||||
0xF4, 0xFF, 0xFB, 0x03, // region 11
|
||||
};
|
||||
|
||||
class TestSFDP : public testing::Test {
|
||||
|
||||
public:
|
||||
|
@ -270,6 +250,26 @@ TEST_F(TestSFDP, TestSFDPReadFailure)
|
|||
*/
|
||||
TEST_F(TestSFDP, TestMoreRegionsThanSupported)
|
||||
{
|
||||
/**
|
||||
* Based on Cypress S25FS512S, modified to have one descriptor,
|
||||
* twelve regions for test purpose.
|
||||
*/
|
||||
const uint8_t sector_map_single_descriptor_twelve_regions[] {
|
||||
0xFF, 0x01, 0x0B, 0xFF, // header, highest region = 0x0B
|
||||
0xF1, 0x7F, 0x00, 0x00, // region 0
|
||||
0xF4, 0x7F, 0x03, 0x00, // region 1
|
||||
0xF4, 0xFF, 0xFB, 0x03, // region 2
|
||||
0xF1, 0x7F, 0x00, 0x00, // region 3
|
||||
0xF4, 0x7F, 0x03, 0x00, // region 4
|
||||
0xF4, 0xFF, 0xFB, 0x03, // region 5
|
||||
0xF1, 0x7F, 0x00, 0x00, // region 6
|
||||
0xF4, 0x7F, 0x03, 0x00, // region 7
|
||||
0xF4, 0xFF, 0xFB, 0x03, // region 8
|
||||
0xF1, 0x7F, 0x00, 0x00, // region 9
|
||||
0xF4, 0x7F, 0x03, 0x00, // region 10
|
||||
0xF4, 0xFF, 0xFB, 0x03, // region 11
|
||||
};
|
||||
|
||||
mbed::sfdp_hdr_info header_info;
|
||||
set_sector_map_param_table(
|
||||
header_info.smptbl,
|
||||
|
|
Loading…
Reference in New Issue