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

Side by Side Diff: tests/MemsetTest.cpp

Issue 100113004: Use DEFINE_TESTCLASS_SHORT macro in tests. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: rebase Created 7 years 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/MatrixTest.cpp ('k') | tests/MetaDataTest.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 2011 Google Inc. 2 * Copyright 2011 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 "Test.h" 8 #include "Test.h"
9 #include "TestClassDef.h"
9 #include "SkChunkAlloc.h" 10 #include "SkChunkAlloc.h"
10 #include "SkUtils.h" 11 #include "SkUtils.h"
11 12
12 static void test_chunkalloc(skiatest::Reporter* reporter) { 13 static void test_chunkalloc(skiatest::Reporter* reporter) {
13 size_t min = 256; 14 size_t min = 256;
14 SkChunkAlloc alloc(min); 15 SkChunkAlloc alloc(min);
15 16
16 REPORTER_ASSERT(reporter, 0 == alloc.totalCapacity()); 17 REPORTER_ASSERT(reporter, 0 == alloc.totalCapacity());
17 REPORTER_ASSERT(reporter, 0 == alloc.totalUsed()); 18 REPORTER_ASSERT(reporter, 0 == alloc.totalUsed());
18 REPORTER_ASSERT(reporter, 0 == alloc.blockCount()); 19 REPORTER_ASSERT(reporter, 0 == alloc.blockCount());
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 compare32(base + count, 0, TOTAL - count - PAD - alignment )); 109 compare32(base + count, 0, TOTAL - count - PAD - alignment ));
109 } 110 }
110 } 111 }
111 } 112 }
112 113
113 /** 114 /**
114 * Test sk_memset16 and sk_memset32. 115 * Test sk_memset16 and sk_memset32.
115 * For performance considerations, implementations may take different paths 116 * For performance considerations, implementations may take different paths
116 * depending on the alignment of the dst, and/or the size of the count. 117 * depending on the alignment of the dst, and/or the size of the count.
117 */ 118 */
118 static void TestMemset(skiatest::Reporter* reporter) { 119 DEF_TEST(Memset, reporter) {
119 test_16(reporter); 120 test_16(reporter);
120 test_32(reporter); 121 test_32(reporter);
121 122
122 test_chunkalloc(reporter); 123 test_chunkalloc(reporter);
123 }; 124 }
124
125 #include "TestClassDef.h"
126 DEFINE_TESTCLASS("Memset", TestMemsetClass, TestMemset)
OLDNEW
« no previous file with comments | « tests/MatrixTest.cpp ('k') | tests/MetaDataTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698