Cleanup: comment line length (tests)
This commit is contained in:
parent
e63eb6ed26
commit
e17e119a31
|
@ -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);
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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__);
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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));
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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 */
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue