23 EXPECT_STREQ(
"// Copyright ",
buffer);
30 char* encoded =
reinterpret_cast<char*
>(
34 for (
const char*
p = kFilename; *
p !=
'\0';
p++) {
50 EXPECT_STREQ(
"// Copyright ",
buffer);
56 const char* kRelativeFilename =
58 const char* kFilename =
60 EXPECT_NOTNULL(kFilename);
61 char* encoded =
reinterpret_cast<char*
>(
65 for (
const char*
p = kFilename; *
p !=
'\0';
p++) {
81 EXPECT_STREQ(
"// Copyright ",
buffer);
86static const char*
Concat(
const char*
a,
const char*
b) {
87 const intptr_t
len = strlen(
a) + strlen(
b);
90 snprintf(c,
len + 1,
"%s%s",
a,
b);
95 const char* kRelativeFilename =
97 const char* kAbsoluteFilename =
99 EXPECT_NOTNULL(kAbsoluteFilename);
100 const char* kFilename =
Concat(
"file:///", kAbsoluteFilename);
102 char* encoded =
reinterpret_cast<char*
>(
106 for (
const char*
p = kFilename; *
p !=
'\0';
p++) {
122 EXPECT_STREQ(
"// Copyright ",
buffer);
128 const char* kRelativeFilename =
131 EXPECT_NOTNULL(strSystemTemp);
132 const char* kTempDir =
Concat(strSystemTemp,
"/foo bar");
134 EXPECT_NOTNULL(strTempDir);
135 const char* kTargetFilename =
Concat(strTempDir,
"/file test.cc");
139 const char* kAbsoluteFilename =
141 EXPECT_NOTNULL(kAbsoluteFilename);
142 const char* kFilename =
Concat(
"file:///", kAbsoluteFilename);
144 char* encoded =
reinterpret_cast<char*
>(
148 for (
const char*
p = kFilename; *
p !=
'\0';
p++) {
158 printf(
"encoded: %s\n", encoded);
165 EXPECT_STREQ(
"// Copyright ",
buffer);
173 char* encoded =
reinterpret_cast<char*
>(
177 for (
const char*
p = kFilename; *
p !=
'\0';
p++) {
193 char* encoded =
reinterpret_cast<char*
>(
197 for (
const char*
p = kFilename; *
p !=
'\0';
p++) {
212 const char* kFilename =
216 EXPECT_EQ(42,
file->Length());
222 const char* kFilename =
227 EXPECT_EQ(12,
file->Position());
229 EXPECT_EQ(18,
file->Position());
static char * ScopedCString(intptr_t length)
static bool Delete(Namespace *namespc, const char *path, bool recursive)
static const char * CreateTemp(Namespace *namespc, const char *path)
static const char * SystemTemp(Namespace *namespc)
static const char * GetCanonicalPath(Namespace *namespc, const char *path, char *dest=nullptr, int dest_size=0)
static File * OpenUri(Namespace *namespc, const char *uri, FileOpenMode mode)
static bool Copy(Namespace *namespc, const char *old_path, const char *new_path)
static File * Open(Namespace *namespc, const char *path, FileOpenMode mode)
SK_API bool Read(SkStreamSeekable *src, SkDocumentPage *dstArray, int dstArrayCount, const SkDeserialProcs *=nullptr)
std::string printf(const char *fmt,...) SK_PRINTF_LIKE(1
const char * GetFileName(const char *name)
static const char * Concat(const char *a, const char *b)
TEST_CASE(DirectoryCurrent)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir Path to the cache directory This is different from the persistent_cache_path in embedder which is used for Skia shader cache icu native lib Path to the library file that exports the ICU data vm service The hostname IP address on which the Dart VM Service should be served If not defaults to or::depending on whether ipv6 is specified vm service A custom Dart VM Service port The default is to pick a randomly available open port disable vm Disable the Dart VM Service The Dart VM Service is never available in release mode disable vm service Disable mDNS Dart VM Service publication Bind to the IPv6 localhost address for the Dart VM Service Ignored if vm service host is set endless trace buffer