Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(133)

Unified Diff: tests/DataRefTest.cpp

Issue 26223009: Remove SkDataTable from SkFlattenable hierarchy. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkDataTable.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/DataRefTest.cpp
diff --git a/tests/DataRefTest.cpp b/tests/DataRefTest.cpp
index 9043a58722a3870e7a1656015d4df79e6b303327..c32c4553caa4a97f9c31f650103dba38298a1ea9 100644
--- a/tests/DataRefTest.cpp
+++ b/tests/DataRefTest.cpp
@@ -25,26 +25,10 @@ static void test_is_equal(skiatest::Reporter* reporter,
}
}
-static void test_datatable_flatten(skiatest::Reporter* reporter,
- SkDataTable* table) {
- SkOrderedWriteBuffer wb(1024);
- wb.writeFlattenable(table);
-
- size_t wsize = wb.size();
- SkAutoMalloc storage(wsize);
- wb.writeToMemory(storage.get());
-
- SkOrderedReadBuffer rb(storage.get(), wsize);
- SkAutoTUnref<SkDataTable> newTable((SkDataTable*)rb.readFlattenable());
-
- test_is_equal(reporter, table, newTable);
-}
-
static void test_datatable_is_empty(skiatest::Reporter* reporter,
SkDataTable* table) {
REPORTER_ASSERT(reporter, table->isEmpty());
REPORTER_ASSERT(reporter, 0 == table->count());
- test_datatable_flatten(reporter, table);
}
static void test_emptytable(skiatest::Reporter* reporter) {
@@ -77,7 +61,6 @@ static void test_simpletable(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, *itable->atT<int>(i, &size) == idata[i]);
REPORTER_ASSERT(reporter, sizeof(int) == size);
}
- test_datatable_flatten(reporter, itable);
}
static void test_vartable(skiatest::Reporter* reporter) {
@@ -104,7 +87,6 @@ static void test_vartable(skiatest::Reporter* reporter) {
const char* s = table->atStr(i);
REPORTER_ASSERT(reporter, strlen(s) == strlen(str[i]));
}
- test_datatable_flatten(reporter, table);
}
static void test_tablebuilder(skiatest::Reporter* reporter) {
@@ -131,7 +113,6 @@ static void test_tablebuilder(skiatest::Reporter* reporter) {
const char* s = table->atStr(i);
REPORTER_ASSERT(reporter, strlen(s) == strlen(str[i]));
}
- test_datatable_flatten(reporter, table);
}
static void test_globaltable(skiatest::Reporter* reporter) {
@@ -150,7 +131,6 @@ static void test_globaltable(skiatest::Reporter* reporter) {
REPORTER_ASSERT(reporter, *table->atT<const char>(i, &size) == i);
REPORTER_ASSERT(reporter, sizeof(int) == size);
}
- test_datatable_flatten(reporter, table);
}
static void TestDataTable(skiatest::Reporter* reporter) {
« no previous file with comments | « src/core/SkDataTable.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698