diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2022-06-27 15:19:27 -0600 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-06-29 18:33:14 +0000 |
commit | 6fbeefde0e435eb1d7f536f62b323adc36fd0e32 (patch) | |
tree | 767a6134966faa5d2a8db4f9c7fde22cc5d56869 | |
parent | f27d3887d5db257f6cd8ab63cd7139f25057a3f1 (diff) | |
download | chrome-ec-6fbeefde0e435eb1d7f536f62b323adc36fd0e32.tar.gz |
test/base32.c: Format with clang-format
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: Id21980730b1fd999ae0645bee15ccffc6846109f
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3730470
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
-rw-r--r-- | test/base32.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/test/base32.c b/test/base32.c index faaefc266f..27e8d8d059 100644 --- a/test/base32.c +++ b/test/base32.c @@ -54,8 +54,7 @@ DECLARE_EC_TEST(test_crc5) return EC_SUCCESS; } -static int enctest(const void *src, int srcbits, int crc_every, - const char *enc) +static int enctest(const void *src, int srcbits, int crc_every, const char *enc) { char dest[32]; @@ -73,7 +72,7 @@ static int enctest(const void *src, int srcbits, int crc_every, DECLARE_EC_TEST(test_encode) { - const uint8_t src1[5] = {0xff, 0x00, 0xff, 0x00, 0xff}; + const uint8_t src1[5] = { 0xff, 0x00, 0xff, 0x00, 0xff }; char enc[32]; /* Test for enough space; error produces null string */ @@ -104,10 +103,9 @@ DECLARE_EC_TEST(test_encode) /* CRC requires exact multiple of symbol count */ ENCTEST("\xff\x00\xff\x00\xff", 40, 4, "96ARU8AH9D"); ENCTEST("\xff\x00\xff\x00\xff", 40, 8, "96AR8AH9L"); - zassert_equal( - base32_encode(enc, 16, (uint8_t *)"\xff\x00\xff\x00\xff", - 40, 6), - EC_ERROR_INVAL, NULL); + zassert_equal(base32_encode(enc, 16, (uint8_t *)"\xff\x00\xff\x00\xff", + 40, 6), + EC_ERROR_INVAL, NULL); /* But what matters is symbol count, not bit count */ ENCTEST("\xff\x00\xff\x00\xfe", 39, 4, "96ARU8AH8P"); @@ -201,8 +199,7 @@ DECLARE_EC_TEST(test_decode) TEST_MAIN() { - ztest_test_suite(test_base32_lib, - ztest_unit_test(test_crc5), + ztest_test_suite(test_base32_lib, ztest_unit_test(test_crc5), ztest_unit_test(test_encode), ztest_unit_test(test_decode)); ztest_run_test_suite(test_base32_lib); |