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:
Diffstat (limited to 'source/blender/blenlib/tests/BLI_string_test.cc')
-rw-r--r--source/blender/blenlib/tests/BLI_string_test.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/blenlib/tests/BLI_string_test.cc b/source/blender/blenlib/tests/BLI_string_test.cc
index 1760b7966e3..a5fd3e31c31 100644
--- a/source/blender/blenlib/tests/BLI_string_test.cc
+++ b/source/blender/blenlib/tests/BLI_string_test.cc
@@ -570,6 +570,16 @@ TEST(string, StringStrncasestr)
EXPECT_EQ(res, (void *)NULL);
}
+/* BLI_string_max_possible_word_count */
+TEST(string, StringMaxPossibleWordCount)
+{
+ EXPECT_EQ(BLI_string_max_possible_word_count(0), 1);
+ EXPECT_EQ(BLI_string_max_possible_word_count(1), 1);
+ EXPECT_EQ(BLI_string_max_possible_word_count(2), 2);
+ EXPECT_EQ(BLI_string_max_possible_word_count(3), 2);
+ EXPECT_EQ(BLI_string_max_possible_word_count(10), 6);
+}
+
/* BLI_string_is_decimal */
TEST(string, StrIsDecimal)
{