|
Blender V5.0
|
#include "testing/testing.h"#include <array>#include <initializer_list>#include <ostream>#include <string>#include <utility>#include <vector>#include "MEM_guardedalloc.h"#include "BLI_string.h"#include "BLI_string_utf8.h"#include "BLI_string_utils.hh"#include "BLI_utildefines.h"Go to the source code of this file.
Classes | |
| struct | WordInfo |
| class | StringFindSplitWords |
| class | StringCasecmpNatural |
| class | StringEscape |
Macros | |
| #define | STR_N_CAT(dst_init, dst_size, src, result_expect) |
| #define | STR_REPLACE_RANGE(src, size, beg, end, dst, result_expect) |
Functions | |
| TEST (BLI_string, bounded_strcpy) | |
| TEST (BLI_string, StartsWith) | |
| TEST (BLI_string, EndsWith) | |
String Concatenate | |
| TEST (string, StrCat) | |
String Replace | |
| TEST (string, StrReplaceRange) | |
String Partition | |
| TEST (string, StrPartition) | |
| TEST (string, StrRPartition) | |
| TEST (string, StrPartitionEx) | |
| TEST (string, StrPartitionUtf8) | |
| TEST (string, StrRPartitionUtf8) | |
| TEST (string, StrPartitionExUtf8) | |
String Format Integer (Grouped) | |
| TEST (string, StrFormatIntGrouped) | |
| TEST (string, StrFormatUint64Grouped) | |
String Format Byte Units | |
| TEST (string, StrFormatByteUnits) | |
String Format Decimal Units | |
| TEST (string, StrFormatDecimalUnits) | |
| TEST (string, StrFormatIntegerUnits) | |
String Length (Clamped) | |
| TEST (string, StringNLen) | |
String Find Split Words | |
| static std::ostream & | operator<< (std::ostream &os, const WordInfo &word_info) |
| TEST_F (StringFindSplitWords, Simple) | |
| TEST_F (StringFindSplitWords, Triple) | |
| TEST_F (StringFindSplitWords, Spacing) | |
| TEST_F (StringFindSplitWords, Trailing_Left) | |
| TEST_F (StringFindSplitWords, Trailing_Right) | |
| TEST_F (StringFindSplitWords, Trailing_LeftRight) | |
| TEST_F (StringFindSplitWords, Blank) | |
| TEST_F (StringFindSplitWords, Whitespace) | |
| TEST_F (StringFindSplitWords, LimitWords) | |
| TEST_F (StringFindSplitWords, LimitChars) | |
String Element | |
| TEST (string, StringElemEmpty) | |
| TEST (string, StringElemSingle) | |
| TEST (string, StringElemComplex) | |
String Search (Case Insensitive) | |
| TEST (string, StringStrncasestr) | |
String Maximum Word Count | |
| TEST (string, StringMaxPossibleWordCount) | |
String is Decimal | |
| TEST (string, StrIsDecimal) | |
String Case Insensitive Comparison | |
| TEST_F (StringCasecmpNatural, Empty) | |
| TEST_F (StringCasecmpNatural, Whitespace) | |
| TEST_F (StringCasecmpNatural, TextOnlyLowerCase) | |
| TEST_F (StringCasecmpNatural, TextMixedCase) | |
| TEST_F (StringCasecmpNatural, Period) | |
| TEST_F (StringCasecmpNatural, OnlyNumbers) | |
| TEST_F (StringCasecmpNatural, TextAndNumbers) | |
String Escape/Un-Escape | |
| TEST_F (StringEscape, Simple) | |
| TEST_F (StringEscape, Control) | |
String Join | |
| #define | BUFFER_SIZE 128 |
| static void | string_join_array_test_truncate (const char *strings[], int strings_num, char buffer[BUFFER_SIZE]) |
| static void | string_join_array_with_sep_char_test_truncate (const char *strings[], int strings_num, char buffer[BUFFER_SIZE]) |
| TEST (string, StrJoin_Truncate) | |
| #define BUFFER_SIZE 128 |
Definition at line 765 of file BLI_string_test.cc.
Referenced by string_join_array_test_truncate(), string_join_array_with_sep_char_test_truncate(), and TEST().
| #define STR_N_CAT | ( | dst_init, | |
| dst_size, | |||
| src, | |||
| result_expect ) |
Referenced by TEST().
| #define STR_REPLACE_RANGE | ( | src, | |
| size, | |||
| beg, | |||
| end, | |||
| dst, | |||
| result_expect ) |
Referenced by TEST().
|
static |
Definition at line 873 of file BLI_string_test.cc.
References WordInfo::end, and WordInfo::start.
|
static |
Definition at line 767 of file BLI_string_test.cc.
References BLI_string_join_array(), BLI_string_join_arrayN(), BUFFER_SIZE, EXPECT_EQ(), and MEM_freeN().
Referenced by TEST().
|
static |
Definition at line 787 of file BLI_string_test.cc.
References BLI_string_join_array_by_sep_char(), BLI_string_join_array_by_sep_charN(), BUFFER_SIZE, EXPECT_EQ(), and MEM_freeN().
Referenced by TEST().
| TEST | ( | BLI_string | , |
| bounded_strcpy | ) |
Definition at line 1413 of file BLI_string_test.cc.
| TEST | ( | BLI_string | , |
| EndsWith | ) |
Definition at line 1437 of file BLI_string_test.cc.
References BLI_str_endswith().
| TEST | ( | BLI_string | , |
| StartsWith | ) |
Definition at line 1428 of file BLI_string_test.cc.
References BLI_str_startswith().
| TEST | ( | string | , |
| StrCat | ) |
Definition at line 30 of file BLI_string_test.cc.
References STR_N_CAT.
| TEST | ( | string | , |
| StrFormatByteUnits | ) |
Definition at line 470 of file BLI_string_test.cc.
References BLI_str_format_byte_unit(), BLI_STR_FORMAT_INT64_BYTE_UNIT_SIZE, EXPECT_EQ(), and size().
| TEST | ( | string | , |
| StrFormatDecimalUnits | ) |
Definition at line 543 of file BLI_string_test.cc.
References BLI_str_format_decimal_unit(), BLI_STR_FORMAT_INT32_DECIMAL_UNIT_SIZE, INT32_MAX, and size().
| TEST | ( | string | , |
| StrFormatIntegerUnits | ) |
Definition at line 638 of file BLI_string_test.cc.
References BLI_STR_FORMAT_INT32_INTEGER_UNIT_SIZE, BLI_str_format_integer_unit(), INT32_MAX, and size().
| TEST | ( | string | , |
| StrFormatIntGrouped | ) |
Definition at line 404 of file BLI_string_test.cc.
References BLI_STR_FORMAT_INT32_GROUPED_SIZE, BLI_str_format_int_grouped(), and EXPECT_EQ().
| TEST | ( | string | , |
| StrFormatUint64Grouped | ) |
Definition at line 440 of file BLI_string_test.cc.
References BLI_str_format_uint64_grouped(), BLI_STR_FORMAT_UINT64_GROUPED_SIZE, and EXPECT_EQ().
| TEST | ( | string | , |
| StringElemComplex | ) |
Definition at line 1011 of file BLI_string_test.cc.
References BLI_string_elem_split_by_delim().
| TEST | ( | string | , |
| StringElemEmpty | ) |
Definition at line 991 of file BLI_string_test.cc.
References BLI_string_elem_split_by_delim().
| TEST | ( | string | , |
| StringElemSingle | ) |
Definition at line 1002 of file BLI_string_test.cc.
References BLI_string_elem_split_by_delim().
| TEST | ( | string | , |
| StringMaxPossibleWordCount | ) |
Definition at line 1071 of file BLI_string_test.cc.
References BLI_string_max_possible_word_count(), and EXPECT_EQ().
| TEST | ( | string | , |
| StringNLen | ) |
Definition at line 740 of file BLI_string_test.cc.
References BLI_strnlen(), and EXPECT_EQ().
| TEST | ( | string | , |
| StringStrncasestr | ) |
Definition at line 1040 of file BLI_string_test.cc.
References BLI_strncasestr(), and EXPECT_EQ().
| TEST | ( | string | , |
| StrIsDecimal | ) |
Definition at line 1087 of file BLI_string_test.cc.
References BLI_string_is_decimal().
| TEST | ( | string | , |
| StrJoin_Truncate | ) |
Definition at line 809 of file BLI_string_test.cc.
References ARRAY_SIZE, BUFFER_SIZE, string_join_array_test_truncate(), and string_join_array_with_sep_char_test_truncate().
| TEST | ( | string | , |
| StrPartition | ) |
Definition at line 99 of file BLI_string_test.cc.
References BLI_str_partition(), EXPECT_EQ(), and str.
| TEST | ( | string | , |
| StrPartitionEx | ) |
Definition at line 217 of file BLI_string_test.cc.
References BLI_str_partition_ex(), EXPECT_EQ(), and str.
| TEST | ( | string | , |
| StrPartitionExUtf8 | ) |
Definition at line 366 of file BLI_string_test.cc.
References BLI_str_partition_ex_utf8(), EXPECT_EQ(), and str.
| TEST | ( | string | , |
| StrPartitionUtf8 | ) |
Definition at line 248 of file BLI_string_test.cc.
References BLI_str_partition_utf8(), EXPECT_EQ(), and str.
| TEST | ( | string | , |
| StrReplaceRange | ) |
Definition at line 57 of file BLI_string_test.cc.
References STR_REPLACE_RANGE.
| TEST | ( | string | , |
| StrRPartition | ) |
Definition at line 158 of file BLI_string_test.cc.
References BLI_str_rpartition(), EXPECT_EQ(), and str.
| TEST | ( | string | , |
| StrRPartitionUtf8 | ) |
Definition at line 307 of file BLI_string_test.cc.
References BLI_str_rpartition_utf8(), EXPECT_EQ(), and str.
| TEST_F | ( | StringCasecmpNatural | , |
| Empty | ) |
Definition at line 1161 of file BLI_string_test.cc.
References equal.
| TEST_F | ( | StringCasecmpNatural | , |
| OnlyNumbers | ) |
Definition at line 1276 of file BLI_string_test.cc.
References equal.
| TEST_F | ( | StringCasecmpNatural | , |
| Period | ) |
Definition at line 1256 of file BLI_string_test.cc.
References equal.
| TEST_F | ( | StringCasecmpNatural | , |
| TextAndNumbers | ) |
Definition at line 1298 of file BLI_string_test.cc.
References equal.
| TEST_F | ( | StringCasecmpNatural | , |
| TextMixedCase | ) |
Definition at line 1220 of file BLI_string_test.cc.
References equal.
| TEST_F | ( | StringCasecmpNatural | , |
| TextOnlyLowerCase | ) |
Definition at line 1197 of file BLI_string_test.cc.
References equal.
| TEST_F | ( | StringCasecmpNatural | , |
| Whitespace | ) |
Definition at line 1177 of file BLI_string_test.cc.
References equal.
| TEST_F | ( | StringEscape | , |
| Control | ) |
Definition at line 1389 of file BLI_string_test.cc.
| TEST_F | ( | StringEscape | , |
| Simple | ) |
Definition at line 1354 of file BLI_string_test.cc.
References equal.
| TEST_F | ( | StringFindSplitWords | , |
| Blank | ) |
Definition at line 954 of file BLI_string_test.cc.
| TEST_F | ( | StringFindSplitWords | , |
| LimitChars | ) |
Definition at line 972 of file BLI_string_test.cc.
| TEST_F | ( | StringFindSplitWords | , |
| LimitWords | ) |
Definition at line 963 of file BLI_string_test.cc.
| TEST_F | ( | StringFindSplitWords | , |
| Simple | ) |
Definition at line 924 of file BLI_string_test.cc.
| TEST_F | ( | StringFindSplitWords | , |
| Spacing | ) |
Definition at line 934 of file BLI_string_test.cc.
| TEST_F | ( | StringFindSplitWords | , |
| Trailing_Left | ) |
Definition at line 939 of file BLI_string_test.cc.
| TEST_F | ( | StringFindSplitWords | , |
| Trailing_LeftRight | ) |
Definition at line 949 of file BLI_string_test.cc.
| TEST_F | ( | StringFindSplitWords | , |
| Trailing_Right | ) |
Definition at line 944 of file BLI_string_test.cc.
| TEST_F | ( | StringFindSplitWords | , |
| Triple | ) |
Definition at line 929 of file BLI_string_test.cc.
| TEST_F | ( | StringFindSplitWords | , |
| Whitespace | ) |
Definition at line 958 of file BLI_string_test.cc.