[Bf-blender-cvs] [e17e119a312] master: Cleanup: comment line length (tests)

Campbell Barton noreply at git.blender.org
Sat Apr 20 10:16:19 CEST 2019


Commit: e17e119a312528897d2b1f0ee73a9a8a6ecf6150
Author: Campbell Barton
Date:   Sat Apr 20 10:06:01 2019 +0200
Branches: master
https://developer.blender.org/rBe17e119a312528897d2b1f0ee73a9a8a6ecf6150

Cleanup: comment line length (tests)

===================================================================

M	source/creator/creator_args.c
M	tests/gtests/blenlib/BLI_ghash_performance_test.cc
M	tests/gtests/blenlib/BLI_ghash_test.cc
M	tests/gtests/blenlib/BLI_hash_mm2a_test.cc
M	tests/gtests/blenlib/BLI_math_base_test.cc
M	tests/gtests/blenlib/BLI_string_test.cc
M	tests/gtests/blenlib/BLI_string_utf8_test.cc
M	tests/gtests/blenlib/BLI_task_test.cc

===================================================================

diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index f3e4d976d85..e15a1f3e258 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -633,8 +633,8 @@ static int arg_handle_print_help(int UNUSED(argc), const char **UNUSED(argv), vo
 
   BLI_argsPrintArgDoc(ba, "--");
 
-  //printf("\n");
-  //printf("Experimental Features:\n");
+  // printf("\n");
+  // printf("Experimental Features:\n");
 
   /* Other options _must_ be last (anything not handled will show here) */
   printf("\n");
@@ -1944,7 +1944,7 @@ void main_args_setup(bContext *C, bArgs *ba)
 #  define CB(a) a##_doc, a
 #  define CB_EX(a, b) a##_doc_##b, a
 
-  //BLI_argsAdd(ba, pass, short_arg, long_arg, doc, cb, C);
+  // BLI_argsAdd(ba, pass, short_arg, long_arg, doc, cb, C);
 
   /* end argument processing after -- */
   BLI_argsAdd(ba, -1, "--", NULL, CB(arg_handle_arguments_end), NULL);
diff --git a/tests/gtests/blenlib/BLI_ghash_performance_test.cc b/tests/gtests/blenlib/BLI_ghash_performance_test.cc
index b7a6e16e42a..ba995e5014f 100644
--- a/tests/gtests/blenlib/BLI_ghash_performance_test.cc
+++ b/tests/gtests/blenlib/BLI_ghash_performance_test.cc
@@ -15,8 +15,12 @@ extern "C" {
 }
 
 /* Using http://corpora.uni-leipzig.de/downloads/eng_wikipedia_2010_1M-text.tar.gz
- * (1 million of words, about 122MB of text) from http://corpora.informatik.uni-leipzig.de/download.html */
-//#define TEXT_CORPUS_PATH "/path/to/Téléchargements/eng_wikipedia_2010_1M-text/eng_wikipedia_2010_1M-sentences.txt"
+ * (1 million of words, about 122MB of text) from
+ * http://corpora.informatik.uni-leipzig.de/download.html */
+#if 0
+#  define TEXT_CORPUS_PATH \
+    "/path/to/Téléchargements/eng_wikipedia_2010_1M-text/eng_wikipedia_2010_1M-sentences.txt"
+#endif
 
 /* Resizing the hash has a huge cost over global filling operation! */
 //#define GHASH_RESERVE
@@ -459,7 +463,8 @@ TEST(ghash, Int4Murmur2a20000000)
 }
 #endif
 
-/* MultiSmall: create and manipulate a lot of very small ghashes (90% < 10 items, 9% < 100 items, 1% < 1000 items). */
+/* MultiSmall: create and manipulate a lot of very small ghashes
+ * (90% < 10 items, 9% < 100 items, 1% < 1000 items). */
 
 static void multi_small_ghash_tests_one(GHash *ghash, RNG *rng, const unsigned int nbr)
 {
diff --git a/tests/gtests/blenlib/BLI_ghash_test.cc b/tests/gtests/blenlib/BLI_ghash_test.cc
index c2ef064c8c9..d6841ad4d44 100644
--- a/tests/gtests/blenlib/BLI_ghash_test.cc
+++ b/tests/gtests/blenlib/BLI_ghash_test.cc
@@ -33,8 +33,8 @@ extern "C" {
   } \
   void(0)
 
-/* Note: for pure-ghash testing, nature of the keys and data have absolutely no importance! So here we just use mere
- *       random integers stored in pointers. */
+/* Note: for pure-ghash testing, nature of the keys and data have absolutely no importance! So here
+ * we just use mere random integers stored in pointers. */
 
 static void init_keys(unsigned int keys[TESTCASE_SIZE], const int seed)
 {
@@ -58,7 +58,8 @@ static void init_keys(unsigned int keys[TESTCASE_SIZE], const int seed)
   BLI_rng_free(rng);
 }
 
-/* Here we simply insert and then lookup all keys, ensuring we do get back the expected stored 'data'. */
+/* Here we simply insert and then lookup all keys, ensuring we do get back the expected stored
+ * 'data'. */
 TEST(ghash, InsertLookup)
 {
   GHash *ghash = BLI_ghash_new(BLI_ghashutil_inthash_p, BLI_ghashutil_intcmp, __func__);
@@ -81,7 +82,8 @@ TEST(ghash, InsertLookup)
   BLI_ghash_free(ghash, NULL, NULL);
 }
 
-/* Here we simply insert and then remove all keys, ensuring we do get an empty, unshrinked ghash. */
+/* Here we simply insert and then remove all keys, ensuring we do get an empty, unshrinked ghash.
+ */
 TEST(ghash, InsertRemove)
 {
   GHash *ghash = BLI_ghash_new(BLI_ghashutil_inthash_p, BLI_ghashutil_intcmp, __func__);
diff --git a/tests/gtests/blenlib/BLI_hash_mm2a_test.cc b/tests/gtests/blenlib/BLI_hash_mm2a_test.cc
index 16a2db6af56..4f6570d93ad 100644
--- a/tests/gtests/blenlib/BLI_hash_mm2a_test.cc
+++ b/tests/gtests/blenlib/BLI_hash_mm2a_test.cc
@@ -6,8 +6,9 @@ extern "C" {
 #include "BLI_hash_mm2a.h"
 }
 
-/* Note: Reference results are taken from reference implementation (cpp code, CMurmurHash2A variant):
- *       https://smhasher.googlecode.com/svn-history/r130/trunk/MurmurHash2.cpp
+/* Note: Reference results are taken from reference implementation
+ * (cpp code, CMurmurHash2A variant):
+ * https://smhasher.googlecode.com/svn-history/r130/trunk/MurmurHash2.cpp
  */
 
 TEST(hash_mm2a, MM2ABasic)
diff --git a/tests/gtests/blenlib/BLI_math_base_test.cc b/tests/gtests/blenlib/BLI_math_base_test.cc
index 89903e1759c..d62d0ba274d 100644
--- a/tests/gtests/blenlib/BLI_math_base_test.cc
+++ b/tests/gtests/blenlib/BLI_math_base_test.cc
@@ -4,7 +4,8 @@
 
 #include "BLI_math.h"
 
-/* In tests below, when we are using -1.0f as max_diff value, we actually turn the function into a pure-ULP one. */
+/* In tests below, when we are using -1.0f as max_diff value, we actually turn the function into a
+ * pure-ULP one. */
 
 /* Put this here, since we cannot use BLI_assert() in inline math files it seems... */
 TEST(math_base, CompareFFRelativeValid)
@@ -73,8 +74,9 @@ TEST(math_base, CompareFFRelativeZero)
 
   /* Note: in theory, this should return false, since 0.0f  and -0.0f have 0x80000000 diff,
    *       but overflow in subtraction seems to break something here
-   *       (abs(*(int *)&fn0 - *(int *)&f0) == 0x80000000 == fn0), probably because int32 cannot hold this abs value.
-     *       this is yet another illustration of why one shall never use (near-)zero floats in pure-ULP comparison. */
+   *       (abs(*(int *)&fn0 - *(int *)&f0) == 0x80000000 == fn0), probably because int32 cannot
+   * hold this abs value. this is yet another illustration of why one shall never use (near-)zero
+   * floats in pure-ULP comparison. */
   //  EXPECT_FALSE(compare_ff_relative(fn0, f0, -1.0f, 1024));
   //  EXPECT_FALSE(compare_ff_relative(f0, fn0, -1.0f, 1024));
 
diff --git a/tests/gtests/blenlib/BLI_string_test.cc b/tests/gtests/blenlib/BLI_string_test.cc
index 8ce9a8c8f0a..bffd38016a7 100644
--- a/tests/gtests/blenlib/BLI_string_test.cc
+++ b/tests/gtests/blenlib/BLI_string_test.cc
@@ -320,7 +320,8 @@ TEST(string, StrPartitionExUtf8)
   {
     const char *str = "ma\xc3\xb1te-r\xe2\x98\xafial";
 
-    /* "ma\xc3\xb1te-r\xe2\x98\xafial" over "ma\xc3\xb1te" -> "ma", '\xc3\xb1', "te-r\xe2\x98\xafial", 2 */
+    /* "ma\xc3\xb1te-r\xe2\x98\xafial" over
+     * "ma\xc3\xb1te" -> "ma", '\xc3\xb1', "te-r\xe2\x98\xafial", 2 */
     pre_ln = BLI_str_partition_ex_utf8(str, str + 6, delim, &sep, &suf, true);
     EXPECT_EQ(pre_ln, 2);
     EXPECT_EQ(&str[2], sep);
diff --git a/tests/gtests/blenlib/BLI_string_utf8_test.cc b/tests/gtests/blenlib/BLI_string_utf8_test.cc
index 49d773c319e..01a9549044a 100644
--- a/tests/gtests/blenlib/BLI_string_utf8_test.cc
+++ b/tests/gtests/blenlib/BLI_string_utf8_test.cc
@@ -8,9 +8,9 @@ extern "C" {
 #include "BLI_string_utf8.h"
 }
 
-/* Note that 'common' utf-8 variants of string functions (like copy, etc.) are tested in BLI_string_test.cc
- * However, tests below are specific utf-8 conformance ones, and since they eat quite their share of lines,
- * they deserved their own file. */
+/* Note that 'common' utf-8 variants of string functions (like copy, etc.) are tested in
+ * BLI_string_test.cc However, tests below are specific utf-8 conformance ones, and since they eat
+ * quite their share of lines, they deserved their own file. */
 
 /* -------------------------------------------------------------------- */
 /* stubs */
diff --git a/tests/gtests/blenlib/BLI_task_test.cc b/tests/gtests/blenlib/BLI_task_test.cc
index 5979236b6ec..ed2fd60a3e9 100644
--- a/tests/gtests/blenlib/BLI_task_test.cc
+++ b/tests/gtests/blenlib/BLI_task_test.cc
@@ -66,7 +66,8 @@ TEST(task, MempoolIter)
 
   BLI_task_parallel_mempool(mempool, &num_items, task_mempool_iter_func, true);
 
-  /* Those checks should ensure us all items of the mempool were processed once, and only once - as expected. */
+  /* Those checks should ensure us all items of the mempool were processed once, and only once - as
+   * expected. */
   EXPECT_EQ(num_items, 0);
   for (i = 0; i < NUM_ITEMS; i++) {
     if (data[i] != NULL) {



More information about the Bf-blender-cvs mailing list