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

Side by Side Diff: tests/MallocPixelRefTest.cpp

Issue 138563004: Move macros from TestClassDef.h to Test.h (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: upload Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/MD5Test.cpp ('k') | tests/MathTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkData.h" 8 #include "SkData.h"
9 #include "SkMallocPixelRef.h" 9 #include "SkMallocPixelRef.h"
10 #include "Test.h" 10 #include "Test.h"
11 #include "TestClassDef.h"
12 11
13 static void delete_uint8_proc(void* ptr, void*) { 12 static void delete_uint8_proc(void* ptr, void*) {
14 delete[] static_cast<uint8_t*>(ptr); 13 delete[] static_cast<uint8_t*>(ptr);
15 } 14 }
16 15
17 static void set_to_one_proc(void*, void* context) { 16 static void set_to_one_proc(void*, void* context) {
18 *(static_cast<int*>(context)) = 1; 17 *(static_cast<int*>(context)) = 1;
19 } 18 }
20 19
21 /** 20 /**
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 REPORTER_ASSERT(reporter, dataPtr->unique()); 105 REPORTER_ASSERT(reporter, dataPtr->unique());
107 SkAutoTUnref<SkMallocPixelRef> pr( 106 SkAutoTUnref<SkMallocPixelRef> pr(
108 SkMallocPixelRef::NewWithData(info, rowBytes, NULL, data.get(), 4)); 107 SkMallocPixelRef::NewWithData(info, rowBytes, NULL, data.get(), 4));
109 REPORTER_ASSERT(reporter, !(dataPtr->unique())); 108 REPORTER_ASSERT(reporter, !(dataPtr->unique()));
110 data.reset(NULL); 109 data.reset(NULL);
111 REPORTER_ASSERT(reporter, dataPtr->unique()); 110 REPORTER_ASSERT(reporter, dataPtr->unique());
112 REPORTER_ASSERT(reporter, 111 REPORTER_ASSERT(reporter,
113 static_cast<const void*>(dataPtr->bytes() + 4) == pr->pixels()); 112 static_cast<const void*>(dataPtr->bytes() + 4) == pr->pixels());
114 } 113 }
115 } 114 }
OLDNEW
« no previous file with comments | « tests/MD5Test.cpp ('k') | tests/MathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698