From 2986bc1d6e5d89aa59e191f3b0e7eb0be7de42ba Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 16 Apr 2019 16:53:50 +0200 Subject: ClangFormat: add comments to ignore formatting --- tests/gtests/blenlib/BLI_ressource_strings.h | 5 +++++ tests/gtests/blenlib/BLI_string_utf8_test.cc | 4 ++++ 2 files changed, 9 insertions(+) (limited to 'tests/gtests') diff --git a/tests/gtests/blenlib/BLI_ressource_strings.h b/tests/gtests/blenlib/BLI_ressource_strings.h index 819cf893575..da28a05d7ea 100644 --- a/tests/gtests/blenlib/BLI_ressource_strings.h +++ b/tests/gtests/blenlib/BLI_ressource_strings.h @@ -3,6 +3,9 @@ #ifndef __BLENDER_TESTING_BLI_RESSOURCE_STRING_H__ #define __BLENDER_TESTING_BLI_RESSOURCE_STRING_H__ +/* Data file, don't format. */ +/* clang-format off */ + const char words10k[] = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam auctor ultrices purus tincidunt mollis. Vestibulum " "tincidunt imperdiet molestie. Vivamus posuere, risus ut mollis rutrum, lacus nulla mollis velit, consectetur auctor " @@ -602,4 +605,6 @@ const char words10k[] = #endif ; +/* clang-format on */ + #endif /* __BLENDER_TESTING_BLI_RESSOURCE_STRING_H__ */ diff --git a/tests/gtests/blenlib/BLI_string_utf8_test.cc b/tests/gtests/blenlib/BLI_string_utf8_test.cc index 89483d3d440..0dbe36158c5 100644 --- a/tests/gtests/blenlib/BLI_string_utf8_test.cc +++ b/tests/gtests/blenlib/BLI_string_utf8_test.cc @@ -35,6 +35,9 @@ int mk_wcswidth(const wchar_t *pwcs, size_t n) /* -------------------------------------------------------------------- */ /* tests */ +/* Breaking strings is confusing here, prefer over-long lines. */ +/* clang-format off */ + /* Each test is made of a 79 bytes (80 with NULL char) string to test, expected string result after * stripping invalid utf8 bytes, and a single-byte string encoded with expected number of errors. * @@ -283,6 +286,7 @@ const char *utf8_invalid_tests[][3] = { // 5.3.4 U+nFFFE U+nFFFF (for n = 1..10) {NULL, NULL, NULL}, }; +/* clang-format on */ /* BLI_utf8_invalid_strip (and indirectly, BLI_utf8_invalid_byte). */ TEST(string, Utf8InvalidBytes) -- cgit v1.2.3