|
Blender V4.3
|
#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 | STRNCPY_UTF8_ASCII(...) |
| #define | STRNCPY_UTF8_ASCII_TRUNCATE(maxncpy, ...) |
| #define | STRNCPY_UTF8_TRUNCATE(byte_size, ...) |
| #define | STRNCPY_UTF8_TERMINATE_EARLY(byte_size, ...) |
| #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) | |
String Copy (UTF8) | |
| TEST (string, StrCopyUTF8_ASCII) | |
| TEST (string, StrCopyUTF8_ASCII_Truncate) | |
| TEST (string, StrCopyUTF8_TruncateEncoding) | |
| TEST (string, StrCopyUTF8_TerminateEncodingEarly) | |
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 868 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().
| #define STRNCPY_UTF8_ASCII | ( | ... | ) |
Referenced by TEST().
| #define STRNCPY_UTF8_ASCII_TRUNCATE | ( | maxncpy, | |
| ... ) |
Referenced by TEST().
| #define STRNCPY_UTF8_TERMINATE_EARLY | ( | byte_size, | |
| ... ) |
Referenced by TEST().
| #define STRNCPY_UTF8_TRUNCATE | ( | byte_size, | |
| ... ) |
Referenced by TEST().
|
static |
Definition at line 976 of file BLI_string_test.cc.
References WordInfo::end, and WordInfo::start.
|
static |
Definition at line 870 of file BLI_string_test.cc.
References BLI_string_join_array(), BLI_string_join_arrayN(), buffer_alloc(), BUFFER_SIZE, EXPECT_EQ(), and MEM_freeN().
Referenced by TEST().
|
static |
Definition at line 890 of file BLI_string_test.cc.
References BLI_string_join_array_by_sep_char(), BLI_string_join_array_by_sep_charN(), buffer_alloc(), BUFFER_SIZE, EXPECT_EQ(), and MEM_freeN().
Referenced by TEST().
| TEST | ( | BLI_string | , |
| bounded_strcpy | ) |
Definition at line 1516 of file BLI_string_test.cc.
| TEST | ( | string | , |
| StrCat | ) |
Definition at line 133 of file BLI_string_test.cc.
References STR_N_CAT.
| TEST | ( | string | , |
| StrCopyUTF8_ASCII | ) |
Definition at line 30 of file BLI_string_test.cc.
References STRNCPY_UTF8_ASCII.
| TEST | ( | string | , |
| StrCopyUTF8_ASCII_Truncate | ) |
Definition at line 48 of file BLI_string_test.cc.
References STRNCPY_UTF8_ASCII_TRUNCATE.
| TEST | ( | string | , |
| StrCopyUTF8_TerminateEncodingEarly | ) |
Definition at line 94 of file BLI_string_test.cc.
References STRNCPY_UTF8_TERMINATE_EARLY.
| TEST | ( | string | , |
| StrCopyUTF8_TruncateEncoding | ) |
Definition at line 68 of file BLI_string_test.cc.
References STRNCPY_UTF8_TRUNCATE.
| TEST | ( | string | , |
| StrFormatByteUnits | ) |
Definition at line 573 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 646 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 741 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 507 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 543 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 1114 of file BLI_string_test.cc.
References BLI_string_elem_split_by_delim().
| TEST | ( | string | , |
| StringElemEmpty | ) |
Definition at line 1094 of file BLI_string_test.cc.
References BLI_string_elem_split_by_delim().
| TEST | ( | string | , |
| StringElemSingle | ) |
Definition at line 1105 of file BLI_string_test.cc.
References BLI_string_elem_split_by_delim().
| TEST | ( | string | , |
| StringMaxPossibleWordCount | ) |
Definition at line 1174 of file BLI_string_test.cc.
References BLI_string_max_possible_word_count(), and EXPECT_EQ().
| TEST | ( | string | , |
| StringNLen | ) |
Definition at line 843 of file BLI_string_test.cc.
References BLI_strnlen(), and EXPECT_EQ().
| TEST | ( | string | , |
| StringStrncasestr | ) |
Definition at line 1143 of file BLI_string_test.cc.
References BLI_strncasestr(), and EXPECT_EQ().
| TEST | ( | string | , |
| StrIsDecimal | ) |
Definition at line 1190 of file BLI_string_test.cc.
References BLI_string_is_decimal().
| TEST | ( | string | , |
| StrJoin_Truncate | ) |
Definition at line 912 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 202 of file BLI_string_test.cc.
References BLI_str_partition(), EXPECT_EQ(), and str.
| TEST | ( | string | , |
| StrPartitionEx | ) |
Definition at line 320 of file BLI_string_test.cc.
References BLI_str_partition_ex(), EXPECT_EQ(), and str.
| TEST | ( | string | , |
| StrPartitionExUtf8 | ) |
Definition at line 469 of file BLI_string_test.cc.
References BLI_str_partition_ex_utf8(), EXPECT_EQ(), and str.
| TEST | ( | string | , |
| StrPartitionUtf8 | ) |
Definition at line 351 of file BLI_string_test.cc.
References BLI_str_partition_utf8(), EXPECT_EQ(), and str.
| TEST | ( | string | , |
| StrReplaceRange | ) |
Definition at line 160 of file BLI_string_test.cc.
References STR_REPLACE_RANGE.
| TEST | ( | string | , |
| StrRPartition | ) |
Definition at line 261 of file BLI_string_test.cc.
References BLI_str_rpartition(), EXPECT_EQ(), and str.
| TEST | ( | string | , |
| StrRPartitionUtf8 | ) |
Definition at line 410 of file BLI_string_test.cc.
References BLI_str_rpartition_utf8(), EXPECT_EQ(), and str.
| TEST_F | ( | StringCasecmpNatural | , |
| Empty | ) |
Definition at line 1264 of file BLI_string_test.cc.
| TEST_F | ( | StringCasecmpNatural | , |
| OnlyNumbers | ) |
Definition at line 1379 of file BLI_string_test.cc.
| TEST_F | ( | StringCasecmpNatural | , |
| Period | ) |
Definition at line 1359 of file BLI_string_test.cc.
| TEST_F | ( | StringCasecmpNatural | , |
| TextAndNumbers | ) |
Definition at line 1401 of file BLI_string_test.cc.
| TEST_F | ( | StringCasecmpNatural | , |
| TextMixedCase | ) |
Definition at line 1323 of file BLI_string_test.cc.
| TEST_F | ( | StringCasecmpNatural | , |
| TextOnlyLowerCase | ) |
Definition at line 1300 of file BLI_string_test.cc.
| TEST_F | ( | StringCasecmpNatural | , |
| Whitespace | ) |
Definition at line 1280 of file BLI_string_test.cc.
| TEST_F | ( | StringEscape | , |
| Control | ) |
Definition at line 1492 of file BLI_string_test.cc.
| TEST_F | ( | StringEscape | , |
| Simple | ) |
Definition at line 1457 of file BLI_string_test.cc.
| TEST_F | ( | StringFindSplitWords | , |
| Blank | ) |
Definition at line 1057 of file BLI_string_test.cc.
| TEST_F | ( | StringFindSplitWords | , |
| LimitChars | ) |
Definition at line 1075 of file BLI_string_test.cc.
| TEST_F | ( | StringFindSplitWords | , |
| LimitWords | ) |
Definition at line 1066 of file BLI_string_test.cc.
| TEST_F | ( | StringFindSplitWords | , |
| Simple | ) |
Definition at line 1027 of file BLI_string_test.cc.
| TEST_F | ( | StringFindSplitWords | , |
| Spacing | ) |
Definition at line 1037 of file BLI_string_test.cc.
| TEST_F | ( | StringFindSplitWords | , |
| Trailing_Left | ) |
Definition at line 1042 of file BLI_string_test.cc.
| TEST_F | ( | StringFindSplitWords | , |
| Trailing_LeftRight | ) |
Definition at line 1052 of file BLI_string_test.cc.
| TEST_F | ( | StringFindSplitWords | , |
| Trailing_Right | ) |
Definition at line 1047 of file BLI_string_test.cc.
| TEST_F | ( | StringFindSplitWords | , |
| Triple | ) |
Definition at line 1032 of file BLI_string_test.cc.
| TEST_F | ( | StringFindSplitWords | , |
| Whitespace | ) |
Definition at line 1061 of file BLI_string_test.cc.