diff options
Diffstat (limited to 'tests/commonlib')
-rw-r--r-- | tests/commonlib/region-test.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/commonlib/region-test.c b/tests/commonlib/region-test.c index 59f272a7d9..32804825a6 100644 --- a/tests/commonlib/region-test.c +++ b/tests/commonlib/region-test.c @@ -14,30 +14,30 @@ static void test_region(void **state) assert_true(VAL(5) + VAL(10) > VAL(10)); assert_true(VAL(7) + VAL(10) < VAL(10)); - struct region outer = { .offset = VAL(2), .size = VAL(4) }; + struct region outer = {.offset = VAL(2), .size = VAL(4)}; assert_int_equal(region_offset(&outer), VAL(2)); assert_int_equal(region_sz(&outer), VAL(4)); assert_int_equal(region_end(&outer), VAL(6)); - struct region inner = { .offset = VAL(3), .size = VAL(2) }; + struct region inner = {.offset = VAL(3), .size = VAL(2)}; assert_true(region_is_subregion(&outer, &inner)); - struct region touching_bottom = { .offset = VAL(2), .size = VAL(1) }; + struct region touching_bottom = {.offset = VAL(2), .size = VAL(1)}; assert_true(region_is_subregion(&outer, &touching_bottom)); - struct region touching_top = { .offset = VAL(5), .size = VAL(1) }; + struct region touching_top = {.offset = VAL(5), .size = VAL(1)}; assert_true(region_is_subregion(&outer, &touching_top)); - struct region overlap_bottom = { .offset = VAL(1), .size = VAL(2) }; + struct region overlap_bottom = {.offset = VAL(1), .size = VAL(2)}; assert_false(region_is_subregion(&outer, &overlap_bottom)); - struct region overlap_top = { .offset = VAL(5), .size = VAL(2) }; + struct region overlap_top = {.offset = VAL(5), .size = VAL(2)}; assert_false(region_is_subregion(&outer, &overlap_top)); - struct region below = { .offset = 0, .size = VAL(1) }; + struct region below = {.offset = 0, .size = VAL(1)}; assert_false(region_is_subregion(&outer, &below)); - struct region above = { .offset = VAL(0xf), .size = VAL(1) }; + struct region above = {.offset = VAL(0xf), .size = VAL(1)}; assert_false(region_is_subregion(&outer, &above)); } @@ -58,8 +58,8 @@ static int mock_unmap(const struct region_device *rdev, void *mapping) return mock(); } -static ssize_t mock_readat(const struct region_device *rdev, void *buffer, - size_t offset, size_t size) +static ssize_t mock_readat(const struct region_device *rdev, void *buffer, size_t offset, + size_t size) { check_expected_ptr(rdev); check_expected_ptr(buffer); @@ -73,8 +73,8 @@ static ssize_t mock_readat(const struct region_device *rdev, void *buffer, return ret; } -static ssize_t mock_writeat(const struct region_device *rdev, const void *buffer, - size_t offset, size_t size) +static ssize_t mock_writeat(const struct region_device *rdev, const void *buffer, size_t offset, + size_t size) { check_expected_ptr(rdev); check_expected_ptr(buffer); @@ -365,7 +365,7 @@ static void test_mem_rdev(void **state) /* Test read/write/erase of larger chunk. */ size_t offs = 0x47; - size_t chunk = 0x72; + size_t chunk = 0x72; memset(backing, 0, size); memset(scratch, 0, size); memset(scratch + offs, 0x39, chunk); |