38 memcpy(
d.data(),
"helloz", 5);
39 v.set(std::string_view(
"hellooooo").substr(0, 5));
67 v.prepend(std::string_view(
"[["));
68 v.append(std::string_view(
"]]"));
71 v.insert(2, std::string_view(
"?!").substr(0, 1));
85 e.append(
"worldz", 5);
101 a.appendS32(0x7FFFFFFFL);
104 a.appendS32(0x80000001L);
107 a.appendS32(0x80000000L);
111 a.appendU32(0x7FFFFFFFUL);
114 a.appendU32(0x80000001UL);
117 a.appendU32(0xFFFFFFFFUL);
121 a.appendS64(0x7FFFFFFFFFFFFFFFLL, 0);
124 a.appendS64(0x8000000000000001LL, 0);
127 a.appendS64(0x8000000000000000LL, 0);
130 a.appendS64(0x0000000001000000LL, 15);
133 a.appendS64(0xFFFFFFFFFF000000LL, 15);
137 a.appendU64(0x7FFFFFFFFFFFFFFFULL, 0);
140 a.appendU64(0x8000000000000001ULL, 0);
143 a.appendU64(0xFFFFFFFFFFFFFFFFULL, 0);
146 a.appendU64(0x0000000001000000ULL, 15);
151 a.printf(
"%g", 3.14);
153 a.printf(
"hello %s",
"skia");
156 static const struct {
165 { -INFINITY,
"-inf" },
168 #if defined(SK_BUILD_FOR_WIN) && (_MSC_VER < 1900)
169 { 3.4028234e38f,
"3.4028235e+038" },
170 { -3.4028234e38f,
"-3.4028235e+038" },
172 { 3.4028234e38f,
"3.4028235e+38" },
173 { -3.4028234e38f,
"-3.4028235e+38" },
178 a.appendScalar(
gRec[
i].fValue);
180 if (!
a.equals(
gRec[
i].fString)) {
190 for (
size_t i = 0;
i < str.
size(); ++
i) {
201 a.printf(
"%2000s",
" ");
205 a.appendf(
"%1999s",
" ");
211 a.prependf(
"%1999s",
" ");
220 SkStrSplit(
"a-_b_c-dee--f-_-_-g-",
"-_", &results);
295 std::thread threads[5];
296 for (
auto& thread : threads) {
297 thread = std::thread([&] {
299 (void)
copy.equals(
"test");
302 for (
auto& thread : threads) {
311 size_t size = UINT32_MAX - 16;
331 const uint16_t
test1[] = {
332 0xD835, 0xDCD0, 0xD835, 0xDCD1, 0xD835, 0xDCD2, 0xD835, 0xDCD3, 0xD835, 0xDCD4, 0x0020,
333 0xD835, 0xDCD5, 0xD835, 0xDCD6, 0xD835, 0xDCD7, 0xD835, 0xDCD8, 0xD835, 0xDCD9
337 const uint16_t test2[] = {
338 0x0041, 0x0042, 0x0043, 0x0044, 0x0045, 0x0020, 0x0046, 0x0047, 0x0048, 0x0049, 0x004A,
342 const uint16_t test3[] = {
343 0x03B1, 0x03B2, 0x03B3, 0x03B4, 0x03B5, 0x0020, 0x03B6, 0x03B7, 0x03B8, 0x03B9, 0x03BA,
491DEF_TEST(String_resize_after_copy_construction, r) {
static const struct @223 gRec[]
#define SK_PRINTF_LIKE(A, B)
bool equals(SkDrawable *a, SkDrawable *b)
void SkStrSplit(const char *str, const char *delimiters, SkStrSplitMode splitMode, TArray< SkString > *out)
SkString SkStringFromUTF16(const uint16_t *src, size_t count)
static constexpr int kSkStrAppendScalar_MaxSize
SK_API SkString SkStringPrintf(const char *format,...) SK_PRINTF_LIKE(1
Creates a new string and writes into it using a printf()-style format.
static void test_va_list_append(skiatest::Reporter *r, const char format[],...) SK_PRINTF_LIKE(2
static void test_va_list_print(skiatest::Reporter *r, const char format[],...) SK_PRINTF_LIKE(2
static void test_va_list_overflow_prepend(skiatest::Reporter *r, const char format[],...) SK_PRINTF_LIKE(2
static void test_va_list_overflow_append(skiatest::Reporter *r, const char format[],...) SK_PRINTF_LIKE(2
static void test_va_list_prepend(skiatest::Reporter *r, const char format[],...) SK_PRINTF_LIKE(2
static void resize_helper_function(skiatest::Reporter *r, SkString s)
DEF_TEST(String, reporter)
static void assert_2000_spaces(skiatest::Reporter *reporter, const SkString &str)
static void test_va_list_overflow_print(skiatest::Reporter *r, const char format[],...) SK_PRINTF_LIKE(2
#define REPORTER_ASSERT(r, cond,...)
static void test1(skiatest::Reporter *reporter, SkWriter32 *writer)
void void void void appendVAList(const char format[], va_list) SK_PRINTF_LIKE(2
void void printVAList(const char format[], va_list) SK_PRINTF_LIKE(2
void void void void void void prependVAList(const char format[], va_list) SK_PRINTF_LIKE(2
void set(const SkString &src)
bool equals(const SkString &) const
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
uint32_t uint32_t * format
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size