Blender V5.0
BLI_string_utf8_test.cc File Reference
#include "testing/testing.h"
#include "BLI_rand.h"
#include "BLI_string.h"
#include "BLI_string_cursor_utf8.h"
#include "BLI_string_utf8.h"
#include "BLI_utildefines.h"

Go to the source code of this file.

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 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
 TEST (string, StringNLenUTF8)
 TEST (string, StringNLenUTF8_Incomplete)
Test #BLI_strncpy_utf8
 TEST (string, StrCopyUTF8_ASCII)
 TEST (string, StrCopyUTF8_ASCII_Truncate)
 TEST (string, StrCopyUTF8_TruncateEncoding)
 TEST (string, StrCopyUTF8_TruncateEncodingMulti)
 TEST (string, StrCopyUTF8_TerminateEncodingEarly)
Test #BLI_snprintf_utf8
 TEST (string, StrPrintfUTF8_ASCII)
 TEST (string, StrPrintfUTF8_TerminateEncodingEarly)
 TEST (string, StrPrintfUTF8_TruncateEncodingMulti)
Test #BLI_str_utf8_offset_from_index
 TEST (string, Utf8OffsetFromIndex_ClampedIndex)
Test #BLI_str_utf8_as_unicode_step_safe
static size_t utf8_as_char32 (const char *str, const char str_len, char32_t *r_result)
template<size_t Size, size_t SizeWithPadding>
void utf8_as_char32_test_compare_with_pad_bytes (const char utf8_src[Size])
template<size_t Size>
void utf8_as_char32_test_compare (const char utf8_src[Size])
template<size_t Size>
void utf8_as_char32_test_at_buffer_size ()
 TEST (string, Utf8AsUnicodeStep)
Test #BLI_str_cursor_step_next_utf32_empty
 TEST (string, StrCursorStepNextUtf32Empty)
Test #BLI_str_cursor_step_next_utf32_single
 TEST (string, StrCursorStepNextUtf32Single)
Test #BLI_str_cursor_step_next_utf32_simple
 TEST (string, StrCursorStepNextUtf32Simple)
Test #BLI_str_cursor_step_next_utf32_allcombining
 TEST (string, StrCursorStepNextUtf32AllCombining)
Test #BLI_str_cursor_step_next_utf32_complex
 TEST (string, StrCursorStepNextUtf32Complex)
Test #BLI_str_cursor_step_next_utf32_invalid
 TEST (string, StrCursorStepNextUtf32Invalid)
Test #BLI_str_cursor_step_prev_utf32_empty
 TEST (string, StrCursorStepPrevUtf32Empty)
Test #BLI_str_cursor_step_prev_utf32_single
 TEST (string, StrCursorStepPrevUtf32Single)
Test #BLI_str_cursor_step_prev_utf32_simple
 TEST (string, StrCursorStepPrevUtf32Simple)
Test #BLI_str_cursor_step_prev_utf32_allcombining
 TEST (string, StrCursorStepPrevUtf32AllCombining)
Test #BLI_str_cursor_step_prev_utf32_complex
 TEST (string, StrCursorStepPrevUtf32Complex)
Test #BLI_str_cursor_step_prev_utf32_invalid
 TEST (string, StrCursorStepPrevUtf32Invalid)
Test #BLI_str_cursor_step_next_utf8_empty
 TEST (string, StrCursorStepNextUtf8Empty)
Test #BLI_str_cursor_step_next_utf8_single
 TEST (string, StrCursorStepNextUtf8Single)
Test #BLI_str_cursor_step_next_utf8_simple
 TEST (string, StrCursorStepNextUtf8Simple)
Test #BLI_str_cursor_step_next_utf8_allcombining
 TEST (string, StrCursorStepNextUtf8AllCombining)
Test #BLI_str_cursor_step_next_utf8_complex
 TEST (string, StrCursorStepNextUtf8AllComplex)
Test #BLI_str_cursor_step_next_utf8_invalid
 TEST (string, StrCursorStepNextUtf8Invalid)
Test #BLI_str_cursor_step_prev_utf8_empty
 TEST (string, StrCursorStepPrevUtf8Empty)
Test #BLI_str_cursor_step_prev_utf8_single
 TEST (string, StrCursorStepPrevUtf8Single)
 TEST (string, StrCursorStepPrevUtf8Simple)
Test #BLI_str_cursor_step_prev_utf8_allcombining
 TEST (string, StrCursorStepPrevUtf8AllCombining)
Test #BLI_str_cursor_step_prev_utf8_complex
 TEST (string, StrCursorStepPrevUtf8Complex)
Test #BLI_str_cursor_step_prev_utf8_invalid
 TEST (string, StrCursorStepPrevUtf8Invalid)

Test #BLI_str_utf8_invalid_strip

static const char * utf8_invalid_tests [][3]
 TEST (string, Utf8InvalidBytesStrip)
 TEST (string, Utf8InvalidBytesSubstitute)
 TEST (string, Utf8InvalidBytesSubstitutePatterns)

Macro Definition Documentation

◆ ARRAY_ARG

#define ARRAY_ARG ( ...)
Value:
__VA_ARGS__

Referenced by TEST().

◆ EXPECT_BYTE_OFFSET

#define EXPECT_BYTE_OFFSET ( truncate_ofs,
expect_nchars )
Value:
{ \
size_t buf_ofs = 0; \
STRNCPY(buf, ref_str); \
buf[truncate_ofs] = '\0'; \
EXPECT_EQ(BLI_strnlen_utf8_ex(buf, ref_str_len, &buf_ofs), expect_nchars); \
EXPECT_EQ(buf_ofs, truncate_ofs); \
}
size_t BLI_strnlen_utf8_ex(const char *strc, size_t strc_maxlen, size_t *r_len_bytes) ATTR_NONNULL(1

Referenced by TEST().

◆ SNPRINTF_UTF8_ASCII

#define SNPRINTF_UTF8_ASCII ( ...)
Value:
{ \
const char src[] = {__VA_ARGS__, 0}; \
char dst[sizeof(src)]; \
memset(dst, 0xff, sizeof(dst)); \
SNPRINTF_UTF8(dst, "%s", src); \
EXPECT_EQ(strlen(dst), sizeof(dst) - 1); \
EXPECT_STREQ(dst, src); \
}

Referenced by TEST().

◆ SNPRINTF_UTF8_TERMINATE_EARLY

#define SNPRINTF_UTF8_TERMINATE_EARLY ( byte_size,
... )
Value:
{ \
char src[] = {__VA_ARGS__, 0}; \
EXPECT_EQ(BLI_str_utf8_size_or_error(src), byte_size); \
char dst[sizeof(src)]; \
memset(dst, 0xff, sizeof(dst)); \
SNPRINTF_UTF8(dst, "%s", src); \
EXPECT_EQ(strlen(dst), sizeof(dst) - 1); \
EXPECT_STREQ(dst, src); \
for (int i = sizeof(dst) - 1; i > 1; i--) { \
src[i] = '\0'; \
memset(dst, 0xff, sizeof(dst)); \
const int dst_copied = SNPRINTF_UTF8_RLEN(dst, "%s", src); \
EXPECT_STREQ(dst, src); \
EXPECT_EQ(strlen(dst), i); \
EXPECT_EQ(dst_copied, i); \
} \
}
#define SNPRINTF_UTF8_RLEN(dst, format,...)
const char int BLI_str_utf8_size_or_error(const char *p) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
i
Definition text_draw.cc:230

Referenced by TEST().

◆ SNPRINTF_UTF8_TRUNC_EXPECT

#define SNPRINTF_UTF8_TRUNC_EXPECT ( src,
dst_expect,
dst_maxncpy )
Value:
{ \
char dst[dst_maxncpy + 1]; \
dst[dst_maxncpy] = 0xff; \
size_t len = BLI_snprintf_utf8_rlen(dst, dst_maxncpy, "%s", src); \
EXPECT_EQ(len, strlen(dst)); \
EXPECT_STREQ(dst, dst_expect); \
EXPECT_EQ(dst[dst_maxncpy], 0xff); \
}
size_t BLI_snprintf_utf8_rlen(char *__restrict dst, size_t dst_maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
uint len

Referenced by TEST().

◆ STR_MB_ALPHA_1

#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.

unicode_max = 0x110000
bytes_max = 4
sample_chars = dict()
for i in range(unicode_max):
ch = chr(i)
try:
byte = ch.encode('utf-8')
byte_len = len(byte)
except UnicodeEncodeError:
continue
if byte_len not in sample_chars:
# Not essential but useful if the character is printable.
if ch.isalpha():
sample_chars[byte_len] = byte
if byte_len == bytes_max:
break
assert tuple(sorted(sample_chars.keys())) == tuple(range(1, bytes_max + 1))
for i in range(1, bytes_max + 1):
byte = sample_chars[i]
print("#define STR_MB_ALPHA_%d \"" % i, end="")
for x in byte:
print("\\x%02x" % x, end="")
print("\"")

Definition at line 52 of file BLI_string_utf8_test.cc.

Referenced by TEST(), TEST(), TEST(), and TEST().

◆ STR_MB_ALPHA_2

#define STR_MB_ALPHA_2   "\xc2\xaa"

Definition at line 53 of file BLI_string_utf8_test.cc.

Referenced by TEST(), TEST(), TEST(), and TEST().

◆ STR_MB_ALPHA_3

#define STR_MB_ALPHA_3   "\xe0\xa0\x80"

Definition at line 54 of file BLI_string_utf8_test.cc.

Referenced by TEST(), TEST(), TEST(), and TEST().

◆ STR_MB_ALPHA_4

#define STR_MB_ALPHA_4   "\xf0\x90\x80\x80"

Definition at line 55 of file BLI_string_utf8_test.cc.

Referenced by TEST(), TEST(), TEST(), and TEST().

◆ STR_MB_ALPHA_5

#define STR_MB_ALPHA_5   "\xf8\x80\x80\x80\x80"

Definition at line 61 of file BLI_string_utf8_test.cc.

Referenced by TEST(), TEST(), and TEST().

◆ STR_MB_ALPHA_6

#define STR_MB_ALPHA_6   "\xfc\x80\x80\x80\x80\x80"

Definition at line 62 of file BLI_string_utf8_test.cc.

Referenced by TEST(), TEST(), TEST(), and TEST().

◆ STRNCPY_UTF8_ASCII

#define STRNCPY_UTF8_ASCII ( ...)
Value:
{ \
const char src[] = {__VA_ARGS__, 0}; \
char dst[sizeof(src)]; \
memset(dst, 0xff, sizeof(dst)); \
STRNCPY_UTF8(dst, src); \
EXPECT_EQ(strlen(dst), sizeof(dst) - 1); \
EXPECT_STREQ(dst, src); \
}

Referenced by TEST().

◆ STRNCPY_UTF8_ASCII_TRUNCATE

#define STRNCPY_UTF8_ASCII_TRUNCATE ( maxncpy,
... )
Value:
{ \
char src[] = {__VA_ARGS__}; \
char dst[sizeof(src)]; \
memset(dst, 0xff, sizeof(dst)); \
BLI_strncpy_utf8(dst, src, maxncpy); \
int len_expect = std::min<int>(sizeof(src), maxncpy) - 1; \
src[len_expect] = '\0'; /* To be able to use `EXPECT_STREQ`. */ \
EXPECT_EQ(strlen(dst), len_expect); \
EXPECT_STREQ(dst, src); \
}

Referenced by TEST().

◆ STRNCPY_UTF8_TERMINATE_EARLY

#define STRNCPY_UTF8_TERMINATE_EARLY ( byte_size,
... )
Value:
{ \
char src[] = {__VA_ARGS__, 0}; \
EXPECT_EQ(BLI_str_utf8_size_or_error(src), byte_size); \
char dst[sizeof(src)]; \
memset(dst, 0xff, sizeof(dst)); \
STRNCPY_UTF8(dst, src); \
EXPECT_EQ(strlen(dst), sizeof(dst) - 1); \
EXPECT_STREQ(dst, src); \
for (int i = sizeof(dst) - 1; i > 1; i--) { \
src[i] = '\0'; \
memset(dst, 0xff, sizeof(dst)); \
const int dst_copied = STRNCPY_UTF8_RLEN(dst, src); \
EXPECT_STREQ(dst, src); \
EXPECT_EQ(strlen(dst), i); \
EXPECT_EQ(dst_copied, i); \
} \
}
#define STRNCPY_UTF8_RLEN(dst, src)

Referenced by TEST().

◆ STRNCPY_UTF8_TRUNC_EXPECT

#define STRNCPY_UTF8_TRUNC_EXPECT ( src,
dst_expect,
dst_maxncpy )
Value:
{ \
char dst[dst_maxncpy + 1]; \
dst[dst_maxncpy] = 0xff; \
size_t len = BLI_strncpy_utf8_rlen(dst, src, dst_maxncpy); \
EXPECT_EQ(len, strlen(dst)); \
EXPECT_STREQ(dst, dst_expect); \
EXPECT_EQ(dst[dst_maxncpy], 0xff); \
}
char size_t BLI_strncpy_utf8_rlen(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1

Referenced by TEST().

◆ STRNCPY_UTF8_TRUNCATE

#define STRNCPY_UTF8_TRUNCATE ( byte_size,
... )
Value:
{ \
const char src[] = {__VA_ARGS__, 0}; \
EXPECT_EQ(BLI_str_utf8_size_or_error(src), byte_size); \
char dst[sizeof(src)]; \
memset(dst, 0xff, sizeof(dst)); \
STRNCPY_UTF8(dst, src); \
EXPECT_EQ(strlen(dst), sizeof(dst) - 1); \
EXPECT_STREQ(dst, src); \
BLI_strncpy_utf8(dst, src, sizeof(dst) - 1); \
EXPECT_STREQ(dst, ""); \
}

Referenced by TEST().

◆ TEST_SIMPLE

#define TEST_SIMPLE ( src_chars,
expected_error_count,
expected_str )
Value:
{ \
char buff[] = src_chars; \
EXPECT_EQ(BLI_str_utf8_invalid_substitute(buff, strlen(buff), '?'), expected_error_count); \
EXPECT_STREQ(buff, expected_str); \
} \
((void)0)
int BLI_str_utf8_invalid_substitute(char *str, size_t str_len, const char substitute) ATTR_NONNULL(1)

Referenced by TEST().

Function Documentation

◆ TEST() [1/39]

TEST ( string ,
StrCopyUTF8_ASCII  )

Definition at line 453 of file BLI_string_utf8_test.cc.

References STRNCPY_UTF8_ASCII.

◆ TEST() [2/39]

TEST ( string ,
StrCopyUTF8_ASCII_Truncate  )

Definition at line 471 of file BLI_string_utf8_test.cc.

References STRNCPY_UTF8_ASCII_TRUNCATE.

◆ TEST() [3/39]

TEST ( string ,
StrCopyUTF8_TerminateEncodingEarly  )

Definition at line 617 of file BLI_string_utf8_test.cc.

References STRNCPY_UTF8_TERMINATE_EARLY.

◆ TEST() [4/39]

TEST ( string ,
StrCopyUTF8_TruncateEncoding  )

Definition at line 491 of file BLI_string_utf8_test.cc.

References STRNCPY_UTF8_TRUNCATE.

◆ TEST() [5/39]

TEST ( string ,
StrCopyUTF8_TruncateEncodingMulti  )

◆ TEST() [6/39]

TEST ( string ,
StrCursorStepNextUtf32AllCombining  )

Definition at line 945 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_next_utf32(), len, pos, and U.

◆ TEST() [7/39]

TEST ( string ,
StrCursorStepNextUtf32Complex  )

Definition at line 965 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_next_utf32(), len, pos, and U.

◆ TEST() [8/39]

TEST ( string ,
StrCursorStepNextUtf32Empty  )

Definition at line 895 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_next_utf32(), len, pos, and U.

◆ TEST() [9/39]

TEST ( string ,
StrCursorStepNextUtf32Invalid  )

Definition at line 990 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_next_utf32(), len, pos, and U.

◆ TEST() [10/39]

TEST ( string ,
StrCursorStepNextUtf32Simple  )

Definition at line 927 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_next_utf32(), len, pos, and U.

◆ TEST() [11/39]

TEST ( string ,
StrCursorStepNextUtf32Single  )

Definition at line 911 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_next_utf32(), len, pos, and U.

◆ TEST() [12/39]

TEST ( string ,
StrCursorStepNextUtf8AllCombining  )

Definition at line 1190 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_next_utf8(), len, and pos.

◆ TEST() [13/39]

TEST ( string ,
StrCursorStepNextUtf8AllComplex  )

Definition at line 1216 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_next_utf8(), len, and pos.

◆ TEST() [14/39]

TEST ( string ,
StrCursorStepNextUtf8Empty  )

Definition at line 1142 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_next_utf8(), len, and pos.

◆ TEST() [15/39]

TEST ( string ,
StrCursorStepNextUtf8Invalid  )

Definition at line 1251 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_next_utf8(), EXPECT_EQ(), len, and pos.

◆ TEST() [16/39]

TEST ( string ,
StrCursorStepNextUtf8Simple  )

Definition at line 1172 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_next_utf8(), len, and pos.

◆ TEST() [17/39]

TEST ( string ,
StrCursorStepNextUtf8Single  )

Definition at line 1157 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_next_utf8(), len, and pos.

◆ TEST() [18/39]

TEST ( string ,
StrCursorStepPrevUtf32AllCombining  )

Definition at line 1067 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_prev_utf32(), len, pos, and U.

◆ TEST() [19/39]

TEST ( string ,
StrCursorStepPrevUtf32Complex  )

Definition at line 1087 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_prev_utf32(), len, pos, and U.

◆ TEST() [20/39]

TEST ( string ,
StrCursorStepPrevUtf32Empty  )

Definition at line 1021 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_prev_utf32(), len, pos, and U.

◆ TEST() [21/39]

TEST ( string ,
StrCursorStepPrevUtf32Invalid  )

Definition at line 1112 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_prev_utf32(), len, pos, and U.

◆ TEST() [22/39]

TEST ( string ,
StrCursorStepPrevUtf32Simple  )

Definition at line 1050 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_prev_utf32(), len, pos, and U.

◆ TEST() [23/39]

TEST ( string ,
StrCursorStepPrevUtf32Single  )

Definition at line 1035 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_prev_utf32(), len, pos, and U.

◆ TEST() [24/39]

TEST ( string ,
StrCursorStepPrevUtf8AllCombining  )

Definition at line 1330 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_prev_utf8(), len, and pos.

◆ TEST() [25/39]

TEST ( string ,
StrCursorStepPrevUtf8Complex  )

Definition at line 1356 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_prev_utf8(), len, and pos.

◆ TEST() [26/39]

TEST ( string ,
StrCursorStepPrevUtf8Empty  )

Definition at line 1282 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_prev_utf8(), len, and pos.

◆ TEST() [27/39]

TEST ( string ,
StrCursorStepPrevUtf8Invalid  )

Definition at line 1391 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_prev_utf8(), len, and pos.

◆ TEST() [28/39]

TEST ( string ,
StrCursorStepPrevUtf8Simple  )

Definition at line 1313 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_prev_utf8(), len, and pos.

◆ TEST() [29/39]

TEST ( string ,
StrCursorStepPrevUtf8Single  )

Definition at line 1298 of file BLI_string_utf8_test.cc.

References BLI_str_cursor_step_prev_utf8(), len, and pos.

◆ TEST() [30/39]

TEST ( string ,
StringNLenUTF8  )

Definition at line 393 of file BLI_string_utf8_test.cc.

References BLI_strnlen_utf8(), EXPECT_EQ(), and STR_MB_ALPHA_6.

◆ TEST() [31/39]

TEST ( string ,
StringNLenUTF8_Incomplete  )

◆ TEST() [32/39]

TEST ( string ,
StrPrintfUTF8_ASCII  )

Definition at line 656 of file BLI_string_utf8_test.cc.

References SNPRINTF_UTF8_ASCII.

◆ TEST() [33/39]

TEST ( string ,
StrPrintfUTF8_TerminateEncodingEarly  )

Definition at line 674 of file BLI_string_utf8_test.cc.

References SNPRINTF_UTF8_TERMINATE_EARLY.

◆ TEST() [34/39]

TEST ( string ,
StrPrintfUTF8_TruncateEncodingMulti  )

◆ TEST() [35/39]

TEST ( string ,
Utf8AsUnicodeStep  )

Definition at line 871 of file BLI_string_utf8_test.cc.

References utf8_as_char32_test_at_buffer_size().

◆ TEST() [36/39]

TEST ( string ,
Utf8InvalidBytesStrip  )

◆ TEST() [37/39]

TEST ( string ,
Utf8InvalidBytesSubstitute  )

◆ TEST() [38/39]

TEST ( string ,
Utf8InvalidBytesSubstitutePatterns  )

Definition at line 358 of file BLI_string_utf8_test.cc.

References ARRAY_ARG, and TEST_SIMPLE.

◆ TEST() [39/39]

TEST ( string ,
Utf8OffsetFromIndex_ClampedIndex  )

◆ utf8_as_char32()

size_t utf8_as_char32 ( const char * str,
const char str_len,
char32_t * r_result )
static

◆ utf8_as_char32_test_at_buffer_size()

template<size_t Size>
void utf8_as_char32_test_at_buffer_size ( )

◆ utf8_as_char32_test_compare()

template<size_t Size>
void utf8_as_char32_test_compare ( const char utf8_src[Size])

◆ utf8_as_char32_test_compare_with_pad_bytes()

template<size_t Size, size_t SizeWithPadding>
void utf8_as_char32_test_compare_with_pad_bytes ( const char utf8_src[Size])

Definition at line 803 of file BLI_string_utf8_test.cc.

References EXPECT_EQ(), and utf8_as_char32().

Referenced by utf8_as_char32_test_compare().

Variable Documentation

◆ utf8_invalid_tests

const char* utf8_invalid_tests[][3]
static

Definition at line 77 of file BLI_string_utf8_test.cc.

Referenced by TEST(), and TEST().