Go to the source code of this file.
|
static void | test_is_equal (skiatest::Reporter *reporter, const SkDataTable *a, const SkDataTable *b) |
|
static void | test_datatable_is_empty (skiatest::Reporter *reporter, SkDataTable *table) |
|
static void | test_emptytable (skiatest::Reporter *reporter) |
|
static void | test_simpletable (skiatest::Reporter *reporter) |
|
static void | test_vartable (skiatest::Reporter *reporter) |
|
static void | test_globaltable (skiatest::Reporter *reporter) |
|
| DEF_TEST (DataTable, reporter) |
|
static void | delete_int_proc (const void *ptr, void *context) |
|
static void | assert_len (skiatest::Reporter *reporter, const sk_sp< SkData > &ref, size_t len) |
|
static void | assert_data (skiatest::Reporter *reporter, const sk_sp< SkData > &ref, const void *data, size_t len) |
|
static void | test_cstring (skiatest::Reporter *reporter) |
|
static void | test_files (skiatest::Reporter *reporter) |
|
| DEF_TEST (Data, reporter) |
|
| DEF_TEST (Data_empty, reporter) |
|
◆ assert_data()
Definition at line 131 of file DataRefTest.cpp.
132 {
135}
#define REPORTER_ASSERT(r, cond,...)
const void * data() const
◆ assert_len()
◆ DEF_TEST() [1/3]
Definition at line 182 of file DataRefTest.cpp.
182 {
183 const char* str = "We the people, in order to form a more perfect union.";
185
190
195
198
203
206}
static void assert_data(skiatest::Reporter *reporter, const sk_sp< SkData > &ref, const void *data, size_t len)
static void assert_len(skiatest::Reporter *reporter, const sk_sp< SkData > &ref, size_t len)
static void delete_int_proc(const void *ptr, void *context)
static void test_files(skiatest::Reporter *reporter)
static void test_cstring(skiatest::Reporter *reporter)
static sk_sp< SkData > MakeWithProc(const void *ptr, size_t length, ReleaseProc proc, void *ctx)
static sk_sp< SkData > MakeWithCopy(const void *data, size_t length)
static sk_sp< SkData > MakeSubset(const SkData *src, size_t offset, size_t length)
static sk_sp< SkData > MakeEmpty()
◆ DEF_TEST() [2/3]
Definition at line 208 of file DataRefTest.cpp.
208 {
216 };
217 constexpr int N = std::size(array);
218
219 for (
int i = 0; i <
N; ++i) {
221 for (
int j = 0; j <
N; ++j) {
223 }
224 }
225}
static void * sk_malloc_throw(size_t size)
static bool equals(T *a, T *b)
static sk_sp< SkData > MakeWithoutCopy(const void *data, size_t length)
static sk_sp< SkData > MakeFromMalloc(const void *data, size_t length)
static sk_sp< SkData > MakeUninitialized(size_t length)
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
const myers::Point & get(const myers::Segment &)
◆ DEF_TEST() [3/3]
Definition at line 112 of file DataRefTest.cpp.
112 {
117}
static void test_simpletable(skiatest::Reporter *reporter)
static void test_vartable(skiatest::Reporter *reporter)
static void test_emptytable(skiatest::Reporter *reporter)
static void test_globaltable(skiatest::Reporter *reporter)
◆ delete_int_proc()
static void delete_int_proc |
( |
const void * |
ptr, |
|
|
void * |
context |
|
) |
| |
|
static |
Definition at line 121 of file DataRefTest.cpp.
121 {
122 const int*
data = (
const int*)ptr;
125}
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
◆ test_cstring()
Definition at line 137 of file DataRefTest.cpp.
137 {
138 const char str[] = "Hello world";
139 size_t len = strlen(str);
140
143
145
149}
static sk_sp< SkData > MakeWithCString(const char cstr[])
◆ test_datatable_is_empty()
◆ test_emptytable()
Definition at line 40 of file DataRefTest.cpp.
40 {
45
50
54}
static void test_is_equal(skiatest::Reporter *reporter, const SkDataTable *a, const SkDataTable *b)
static void test_datatable_is_empty(skiatest::Reporter *reporter, SkDataTable *table)
static sk_sp< SkDataTable > MakeCopyArray(const void *array, size_t elemSize, int count)
static sk_sp< SkDataTable > MakeArrayProc(const void *array, size_t elemSize, int count, FreeProc proc, void *context)
static sk_sp< SkDataTable > MakeEmpty()
static sk_sp< SkDataTable > MakeCopyArrays(const void *const *ptrs, const size_t sizes[], int count)
◆ test_files()
Definition at line 151 of file DataRefTest.cpp.
151 {
154 return;
155 }
156
158
159 const char s[] =
"abcdefghijklmnopqrstuvwxyz";
160 {
162 if (!writer.isValid()) {
164 return;
165 }
167 }
168
174
180}
FILE * sk_fopen(const char path[], SkFILE_Flags)
static sk_sp< SkData > MakeFromFD(int fd)
static sk_sp< SkData > MakeFromFILE(FILE *f)
static SkString Join(const char *rootPath, const char *relativePath)
const char * c_str() const
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
◆ test_globaltable()
Definition at line 94 of file DataRefTest.cpp.
94 {
95 static const int gData[] = {
96 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
97 };
99
102
104 for (
int i = 0; i <
count; ++i) {
109 }
110}
◆ test_is_equal()
Definition at line 23 of file DataRefTest.cpp.
24 {
26 for (
int i = 0; i <
a->count(); ++i) {
27 size_t sizea, sizeb;
28 const void* mema =
a->at(i, &sizea);
29 const void* memb =
b->at(i, &sizeb);
32 }
33}
◆ test_simpletable()
Definition at line 56 of file DataRefTest.cpp.
56 {
57 const int idata[] = { 1, 4, 9, 16, 25, 63 };
58 int icount = std::size(idata);
61 for (int i = 0; i < icount; ++i) {
66 }
67}
◆ test_vartable()
Definition at line 69 of file DataRefTest.cpp.
69 {
70 const char* str[] = {
71 "", "a", "be", "see", "deigh", "ef", "ggggggggggggggggggggggggggg"
72 };
73 int count = std::size(str);
74 size_t sizes[std::size(str)];
75 for (
int i = 0; i <
count; ++i) {
76 sizes[i] = strlen(str[i]) + 1;
77 }
78
80
82 for (
int i = 0; i <
count; ++i) {
86 str[i]));
88
89 const char*
s =
table->atStr(i);
91 }
92}
◆ gGlobal