tests: Fix tests code and comments style
This patch applies clang-format settings to most of tests files. Some files were fixed "by-hand" to exclude some lines, which whould be less readable after automatic style fixing. Moreover, some comments (mostly in tests/lib/edid-test.c) were adjusted to match coreboot coding style guidelines. Change-Id: I69f25a7b6d8265800c731754e2fbb2255f482134 Signed-off-by: Jakub Czapiga <jacz@semihalf.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/60970 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
This commit is contained in:
committed by
Felix Held
parent
63ec2ac97a
commit
c08b6a7037
@ -7,12 +7,9 @@
|
||||
#include <ip_checksum.h>
|
||||
|
||||
static const uint8_t test_data_simple[] = {
|
||||
0x64, 0x3b, 0x33, 0x17, 0x34, 0x74, 0x62, 0x30,
|
||||
0x75, 0x73, 0xf3, 0x11, 0x30, 0x2c, 0x34, 0x35,
|
||||
0x6d, 0x39, 0x69, 0x32, 0x23, 0x24, 0x76, 0x71,
|
||||
0x77, 0x30, 0x39, 0x75, 0x76, 0x35, 0x71, 0x32,
|
||||
0x40, 0x46, 0x34, 0x34, 0xBB, 0x03, 0x66, 0x52
|
||||
};
|
||||
0x64, 0x3b, 0x33, 0x17, 0x34, 0x74, 0x62, 0x30, 0x75, 0x73, 0xf3, 0x11, 0x30, 0x2c,
|
||||
0x34, 0x35, 0x6d, 0x39, 0x69, 0x32, 0x23, 0x24, 0x76, 0x71, 0x77, 0x30, 0x39, 0x75,
|
||||
0x76, 0x35, 0x71, 0x32, 0x40, 0x46, 0x34, 0x34, 0xBB, 0x03, 0x66, 0x52};
|
||||
static const size_t test_data_simple_sz = ARRAY_SIZE(test_data_simple);
|
||||
static const unsigned long test_data_simple_checksum = 0x4267;
|
||||
|
||||
@ -81,7 +78,7 @@ static void test_add_ip_checksums(void **state)
|
||||
{
|
||||
unsigned long res_1 = compute_ip_checksum(test_data_simple, test_data_simple_sz / 2);
|
||||
unsigned long res_2 = compute_ip_checksum(test_data_simple + test_data_simple_sz / 2,
|
||||
test_data_simple_sz / 2);
|
||||
test_data_simple_sz / 2);
|
||||
unsigned long res_sum = add_ip_checksums(test_data_simple_sz / 2, res_1, res_2);
|
||||
|
||||
assert_int_equal(test_data_simple_checksum, res_sum);
|
||||
|
Reference in New Issue
Block a user