diff options
author | Jiyong Park <jiyong@google.com> | 2017-06-30 17:23:33 +0900 |
---|---|---|
committer | Jiyong Park <jiyong@google.com> | 2017-07-02 11:46:53 +0900 |
commit | cd997e609405cfd6b1f82a1f849f98352b12ae72 (patch) | |
tree | db2d044e52fe9f8d4b3dc1d541f3a15d3b5cfd5b /libziparchive/entry_name_utils_test.cc | |
parent | 22de50d35133c29c06bd8921937489e49d86900f (diff) | |
download | system_core-cd997e609405cfd6b1f82a1f849f98352b12ae72.tar.gz system_core-cd997e609405cfd6b1f82a1f849f98352b12ae72.tar.bz2 system_core-cd997e609405cfd6b1f82a1f849f98352b12ae72.zip |
Ran clang-format on libziparchive sources and headers
Test: build aosp_arm
Change-Id: I469b82b68f2c457f480fb9cd9da2026672985ce3
Diffstat (limited to 'libziparchive/entry_name_utils_test.cc')
-rw-r--r-- | libziparchive/entry_name_utils_test.cc | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/libziparchive/entry_name_utils_test.cc b/libziparchive/entry_name_utils_test.cc index 20715bbb6..d83d8540c 100644 --- a/libziparchive/entry_name_utils_test.cc +++ b/libziparchive/entry_name_utils_test.cc @@ -20,44 +20,43 @@ TEST(entry_name_utils, NullChars) { // 'A', 'R', '\0', 'S', 'E' - const uint8_t zeroes[] = { 0x41, 0x52, 0x00, 0x53, 0x45 }; + const uint8_t zeroes[] = {0x41, 0x52, 0x00, 0x53, 0x45}; ASSERT_FALSE(IsValidEntryName(zeroes, sizeof(zeroes))); - const uint8_t zeroes_continuation_chars[] = { 0xc2, 0xa1, 0xc2, 0x00 }; - ASSERT_FALSE(IsValidEntryName(zeroes_continuation_chars, - sizeof(zeroes_continuation_chars))); + const uint8_t zeroes_continuation_chars[] = {0xc2, 0xa1, 0xc2, 0x00}; + ASSERT_FALSE(IsValidEntryName(zeroes_continuation_chars, sizeof(zeroes_continuation_chars))); } TEST(entry_name_utils, InvalidSequence) { // 0xfe is an invalid start byte - const uint8_t invalid[] = { 0x41, 0xfe }; + const uint8_t invalid[] = {0x41, 0xfe}; ASSERT_FALSE(IsValidEntryName(invalid, sizeof(invalid))); // 0x91 is an invalid start byte (it's a valid continuation byte). - const uint8_t invalid2[] = { 0x41, 0x91 }; + const uint8_t invalid2[] = {0x41, 0x91}; ASSERT_FALSE(IsValidEntryName(invalid2, sizeof(invalid2))); } TEST(entry_name_utils, TruncatedContinuation) { // Malayalam script with truncated bytes. There should be 2 bytes // after 0xe0 - const uint8_t truncated[] = { 0xe0, 0xb4, 0x85, 0xe0, 0xb4 }; + const uint8_t truncated[] = {0xe0, 0xb4, 0x85, 0xe0, 0xb4}; ASSERT_FALSE(IsValidEntryName(truncated, sizeof(truncated))); // 0xc2 is the start of a 2 byte sequence that we've subsequently // dropped. - const uint8_t truncated2[] = { 0xc2, 0xc2, 0xa1 }; + const uint8_t truncated2[] = {0xc2, 0xc2, 0xa1}; ASSERT_FALSE(IsValidEntryName(truncated2, sizeof(truncated2))); } TEST(entry_name_utils, BadContinuation) { // 0x41 is an invalid continuation char, since it's MSBs // aren't "10..." (are 01). - const uint8_t bad[] = { 0xc2, 0xa1, 0xc2, 0x41 }; + const uint8_t bad[] = {0xc2, 0xa1, 0xc2, 0x41}; ASSERT_FALSE(IsValidEntryName(bad, sizeof(bad))); // 0x41 is an invalid continuation char, since it's MSBs // aren't "10..." (are 11). - const uint8_t bad2[] = { 0xc2, 0xa1, 0xc2, 0xfe }; + const uint8_t bad2[] = {0xc2, 0xa1, 0xc2, 0xfe}; ASSERT_FALSE(IsValidEntryName(bad2, sizeof(bad2))); } |