Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /tests/gtests/blenlib/BLI_string_utf8_test.cc
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'tests/gtests/blenlib/BLI_string_utf8_test.cc')
-rw-r--r--tests/gtests/blenlib/BLI_string_utf8_test.cc27
1 files changed, 13 insertions, 14 deletions
diff --git a/tests/gtests/blenlib/BLI_string_utf8_test.cc b/tests/gtests/blenlib/BLI_string_utf8_test.cc
index 0dbe36158c5..49d773c319e 100644
--- a/tests/gtests/blenlib/BLI_string_utf8_test.cc
+++ b/tests/gtests/blenlib/BLI_string_utf8_test.cc
@@ -22,14 +22,13 @@ int mk_wcswidth(const wchar_t *pwcs, size_t n);
int mk_wcwidth(wchar_t ucs)
{
- return 0;
+ return 0;
}
int mk_wcswidth(const wchar_t *pwcs, size_t n)
{
- return 0;
+ return 0;
}
-
}
/* -------------------------------------------------------------------- */
@@ -291,18 +290,18 @@ const char *utf8_invalid_tests[][3] = {
/* BLI_utf8_invalid_strip (and indirectly, BLI_utf8_invalid_byte). */
TEST(string, Utf8InvalidBytes)
{
- for (int i = 0; utf8_invalid_tests[i][0] != NULL; i++) {
- const char *tst = utf8_invalid_tests[i][0];
- const char *tst_stripped = utf8_invalid_tests[i][1];
- const int num_errors = (int)utf8_invalid_tests[i][2][0];
+ for (int i = 0; utf8_invalid_tests[i][0] != NULL; i++) {
+ const char *tst = utf8_invalid_tests[i][0];
+ const char *tst_stripped = utf8_invalid_tests[i][1];
+ const int num_errors = (int)utf8_invalid_tests[i][2][0];
- char buff[80];
- memcpy(buff, tst, sizeof(buff));
+ char buff[80];
+ memcpy(buff, tst, sizeof(buff));
- const int num_errors_found = BLI_utf8_invalid_strip(buff, sizeof(buff) - 1);
+ const int num_errors_found = BLI_utf8_invalid_strip(buff, sizeof(buff) - 1);
- printf("[%02d] -> [%02d] \"%s\" -> \"%s\"\n", num_errors, num_errors_found, tst, buff);
- EXPECT_EQ(num_errors_found, num_errors);
- EXPECT_STREQ(buff, tst_stripped);
- }
+ printf("[%02d] -> [%02d] \"%s\" -> \"%s\"\n", num_errors, num_errors_found, tst, buff);
+ EXPECT_EQ(num_errors_found, num_errors);
+ EXPECT_STREQ(buff, tst_stripped);
+ }
}