|
Blender V5.3
|
#include "testing/testing.h"#include "BLI_rand_c.hh"#include "BLI_string.hh"#include "BLI_string_cursor_utf8.hh"#include "BLI_string_utf8.hh"#include "BLI_utildefines.hh"Go to the source code of this file.
Namespaces | |
| namespace | blender |
| BMesh Iterators. | |
Macros | |
| #define | STR_MB_ALPHA_1 "\x41" |
| #define | STR_MB_ALPHA_2 "\xc2\xaa" |
| #define | STR_MB_ALPHA_3 "\xe0\xa0\x80" |
| #define | STR_MB_ALPHA_4 "\xf0\x90\x80\x80" |
| #define | STR_MB_ALPHA_5 "\xf8\x80\x80\x80\x80" |
| #define | STR_MB_ALPHA_6 "\xfc\x80\x80\x80\x80\x80" |
| #define | TEST_SIMPLE(src_chars, expected_error_count, expected_str) |
| #define | ARRAY_ARG(...) |
| #define | EXPECT_BYTE_OFFSET(truncate_ofs, expect_nchars) |
| #define | STRNCPY_UTF8_ASCII(...) |
| #define | STRNCPY_UTF8_ASCII_TRUNCATE(maxncpy, ...) |
| #define | STRNCPY_UTF8_TRUNCATE(byte_size, ...) |
| #define | STRNCPY_UTF8_TRUNC_EXPECT(src, dst_expect, dst_maxncpy) |
| #define | STRNCPY_UTF8_TERMINATE_EARLY(byte_size, ...) |
| #define | STR_UTF32_AS_UTF8_TRUNC_EXPECT(src, dst_expect, dst_maxncpy) |
| #define | STRNCPY_WCHAR_AS_UTF8_TRUNC_EXPECT(src, dst_expect, dst_maxncpy) |
| #define | SNPRINTF_UTF8_ASCII(...) |
| #define | SNPRINTF_UTF8_TERMINATE_EARLY(byte_size, ...) |
| #define | SNPRINTF_UTF8_TRUNC_EXPECT(src, dst_expect, dst_maxncpy) |
Functions | |
Test #BLI_strnlen_utf8 | |
| blender::TEST (string, StringNLenUTF8) | |
| blender::TEST (string, StringNLenUTF8_NoNil) | |
| blender::TEST (string, StringNLenUTF8_Incomplete) | |
Test #BLI_strncpy_utf8 | |
| blender::TEST (string, StrCopyUTF8_ASCII) | |
| blender::TEST (string, StrCopyUTF8_ASCII_Truncate) | |
| blender::TEST (string, StrCopyUTF8_TruncateEncoding) | |
| blender::TEST (string, StrCopyUTF8_TruncateEncodingMulti) | |
| blender::TEST (string, StrCopyUTF8_TerminateEncodingEarly) | |
Test #BLI_str_utf32_as_utf8 | |
| blender::TEST (string, StrUTF32AsUTF8_Truncate) | |
Test #BLI_strncpy_wchar_as_utf8 | |
| blender::TEST (string, StrCopyWCharAsUTF8_Truncate) | |
Test #BLI_snprintf_utf8 | |
| blender::TEST (string, StrPrintfUTF8_ASCII) | |
| blender::TEST (string, StrPrintfUTF8_TerminateEncodingEarly) | |
| blender::TEST (string, StrPrintfUTF8_TruncateEncodingMulti) | |
Test #BLI_str_utf8_offset_from_index | |
| blender::TEST (string, Utf8OffsetFromIndex_ClampedIndex) | |
Test #BLI_str_find_prev_char_utf8 | |
| blender::TEST (string, StrFindPrevCharUTF8) | |
| blender::TEST (string, StrFindPrevCharUTF8_ContinuationOnly) | |
Test #BLI_str_utf8_as_unicode_step_safe | |
| static size_t | blender::utf8_as_char32 (const char *str, const char str_len, char32_t *r_result) |
| template<size_t Size, size_t SizeWithPadding> | |
| void | blender::utf8_as_char32_test_compare_with_pad_bytes (const char utf8_src[Size]) |
| template<size_t Size> | |
| void | blender::utf8_as_char32_test_compare (const char utf8_src[Size]) |
| template<size_t Size> | |
| void | blender::utf8_as_char32_test_at_buffer_size () |
| blender::TEST (string, Utf8AsUnicodeStep) | |
Test #BLI_str_cursor_step_next_utf32_empty | |
| blender::TEST (string, StrCursorStepNextUtf32Empty) | |
Test #BLI_str_cursor_step_next_utf32_single | |
| blender::TEST (string, StrCursorStepNextUtf32Single) | |
Test #BLI_str_cursor_step_next_utf32_simple | |
| blender::TEST (string, StrCursorStepNextUtf32Simple) | |
Test #BLI_str_cursor_step_next_utf32_allcombining | |
| blender::TEST (string, StrCursorStepNextUtf32AllCombining) | |
Test #BLI_str_cursor_step_next_utf32_complex | |
| blender::TEST (string, StrCursorStepNextUtf32Complex) | |
Test #BLI_str_cursor_step_next_utf32_invalid | |
| blender::TEST (string, StrCursorStepNextUtf32Invalid) | |
Test #BLI_str_cursor_step_prev_utf32_empty | |
| blender::TEST (string, StrCursorStepPrevUtf32Empty) | |
Test #BLI_str_cursor_step_prev_utf32_single | |
| blender::TEST (string, StrCursorStepPrevUtf32Single) | |
Test #BLI_str_cursor_step_prev_utf32_simple | |
| blender::TEST (string, StrCursorStepPrevUtf32Simple) | |
Test #BLI_str_cursor_step_prev_utf32_allcombining | |
| blender::TEST (string, StrCursorStepPrevUtf32AllCombining) | |
Test #BLI_str_cursor_step_prev_utf32_complex | |
| blender::TEST (string, StrCursorStepPrevUtf32Complex) | |
Test #BLI_str_cursor_step_prev_utf32_invalid | |
| blender::TEST (string, StrCursorStepPrevUtf32Invalid) | |
Test #BLI_str_cursor_step_next_utf8_empty | |
| blender::TEST (string, StrCursorStepNextUtf8Empty) | |
Test #BLI_str_cursor_step_next_utf8_single | |
| blender::TEST (string, StrCursorStepNextUtf8Single) | |
Test #BLI_str_cursor_step_next_utf8_simple | |
| blender::TEST (string, StrCursorStepNextUtf8Simple) | |
Test #BLI_str_cursor_step_next_utf8_allcombining | |
| blender::TEST (string, StrCursorStepNextUtf8AllCombining) | |
Test #BLI_str_cursor_step_next_utf8_complex | |
| blender::TEST (string, StrCursorStepNextUtf8AllComplex) | |
Test #BLI_str_cursor_step_next_utf8_invalid | |
| blender::TEST (string, StrCursorStepNextUtf8Invalid) | |
Test #BLI_str_cursor_step_prev_utf8_empty | |
| blender::TEST (string, StrCursorStepPrevUtf8Empty) | |
Test #BLI_str_cursor_step_prev_utf8_single | |
| blender::TEST (string, StrCursorStepPrevUtf8Single) | |
| blender::TEST (string, StrCursorStepPrevUtf8Simple) | |
Test #BLI_str_cursor_step_prev_utf8_allcombining | |
| blender::TEST (string, StrCursorStepPrevUtf8AllCombining) | |
Test #BLI_str_cursor_step_prev_utf8_complex | |
| blender::TEST (string, StrCursorStepPrevUtf8Complex) | |
Test #BLI_str_cursor_step_prev_utf8_invalid | |
| blender::TEST (string, StrCursorStepPrevUtf8Invalid) | |
Test #BLI_str_utf8_invalid_strip | |
| static const char * | blender::utf8_invalid_tests [][3] |
| blender::TEST (string, Utf8InvalidBytesStrip) | |
| blender::TEST (string, Utf8InvalidBytesSubstitute) | |
| blender::TEST (string, Utf8InvalidBytesSubstitutePatterns) | |
| #define ARRAY_ARG | ( | ... | ) |
Referenced by blender::TEST().
| #define EXPECT_BYTE_OFFSET | ( | truncate_ofs, | |
| expect_nchars ) |
Referenced by blender::TEST().
| #define SNPRINTF_UTF8_ASCII | ( | ... | ) |
Referenced by blender::TEST().
| #define SNPRINTF_UTF8_TERMINATE_EARLY | ( | byte_size, | |
| ... ) |
Referenced by blender::TEST().
| #define SNPRINTF_UTF8_TRUNC_EXPECT | ( | src, | |
| dst_expect, | |||
| dst_maxncpy ) |
Referenced by blender::TEST().
| #define STR_MB_ALPHA_1 "\x41" |
Multi byte defies, use when the exact character isn't important, and when proper handling of multi-byte sequences is needed.
Define the first text character found in 1-4 bytes. We might want to generate other string tables too.
Definition at line 54 of file BLI_string_utf8_test.cc.
Referenced by blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), and blender::TEST().
| #define STR_MB_ALPHA_2 "\xc2\xaa" |
Definition at line 55 of file BLI_string_utf8_test.cc.
Referenced by blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), and blender::TEST().
| #define STR_MB_ALPHA_3 "\xe0\xa0\x80" |
Definition at line 56 of file BLI_string_utf8_test.cc.
Referenced by blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), and blender::TEST().
| #define STR_MB_ALPHA_4 "\xf0\x90\x80\x80" |
Definition at line 57 of file BLI_string_utf8_test.cc.
Referenced by blender::TEST(), blender::TEST(), blender::TEST(), blender::TEST(), and blender::TEST().
| #define STR_MB_ALPHA_5 "\xf8\x80\x80\x80\x80" |
Definition at line 63 of file BLI_string_utf8_test.cc.
Referenced by blender::TEST(), blender::TEST(), and blender::TEST().
| #define STR_MB_ALPHA_6 "\xfc\x80\x80\x80\x80\x80" |
Definition at line 64 of file BLI_string_utf8_test.cc.
Referenced by blender::TEST(), blender::TEST(), blender::TEST(), and blender::TEST().
| #define STR_UTF32_AS_UTF8_TRUNC_EXPECT | ( | src, | |
| dst_expect, | |||
| dst_maxncpy ) |
Referenced by blender::TEST().
| #define STRNCPY_UTF8_ASCII | ( | ... | ) |
Referenced by blender::TEST().
| #define STRNCPY_UTF8_ASCII_TRUNCATE | ( | maxncpy, | |
| ... ) |
Referenced by blender::TEST().
| #define STRNCPY_UTF8_TERMINATE_EARLY | ( | byte_size, | |
| ... ) |
Referenced by blender::TEST().
| #define STRNCPY_UTF8_TRUNC_EXPECT | ( | src, | |
| dst_expect, | |||
| dst_maxncpy ) |
Referenced by blender::TEST().
| #define STRNCPY_UTF8_TRUNCATE | ( | byte_size, | |
| ... ) |
Referenced by blender::TEST().
| #define STRNCPY_WCHAR_AS_UTF8_TRUNC_EXPECT | ( | src, | |
| dst_expect, | |||
| dst_maxncpy ) |
Referenced by blender::TEST().
| #define TEST_SIMPLE | ( | src_chars, | |
| expected_error_count, | |||
| expected_str ) |
Referenced by blender::TEST().