Go to the source code of this file.
◆ DEF_TEST()
Definition at line 69 of file OSPathTest.cpp.
69 {
73
74
77
78
80
81
83
84
87
88
92
93
96
97
99 filename.set("file");
101
102
103 filename.reset();
105
106
109}
static void test_dir_with_file(skiatest::Reporter *reporter, const SkString &dir, const SkString &filename)
#define REPORTER_ASSERT(r, cond,...)
static constexpr char SEPARATOR
static SkString Join(const char *rootPath, const char *relativePath)
static SkString Basename(const char *fullPath)
EMSCRIPTEN_KEEPALIVE void empty()
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 Enable an endless trace buffer The default is a ring buffer This is useful when very old events need to viewed For during application launch Memory usage will continue to grow indefinitely however Start app with an specific route defined on the framework flutter assets dir
◆ test_dir_with_file()
Test SkOSPath::Join, SkOSPath::Basename, and SkOSPath::Dirname. Will use SkOSPath::Join to append filename to dir, test that it works correctly, and tests using SkOSPath::Basename on the result.
- Parameters
-
reporter | Reporter for test conditions. |
dir | String representing the path to a folder. May or may not end with SkOSPath::SEPARATOR. |
filename | String representing the basename of a file. Must NOT contain SkOSPath::SEPARATOR. |
Definition at line 26 of file OSPathTest.cpp.
27 {
28
30
31
32
33
35
36
37
38 size_t expectedSize =
dir.size() + filename.
size();
40 expectedSize++;
41 }
43
46
47
49
50
51
55 }
56 if (!dirname.
equals(strippedDir)) {
58 }
60
61
63
64
67}
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static SkString Dirname(const char *fullPath)
void void void void void void void remove(size_t offset, size_t length)
bool equals(const SkString &) const
bool contains(const char substring[]) const
const char * c_str() const