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

Side by Side Diff: tests/WArrayTest.cpp

Issue 27044002: Clean up SkTypes.h. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: For patch -p1. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/StringTest.cpp ('k') | no next file » | 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 9
10 // Include the implementation so we can make an appropriate template instance. 10 // Include the implementation so we can make an appropriate template instance.
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 } 163 }
164 return false; 164 return false;
165 } 165 }
166 166
167 bool RunTest() { 167 bool RunTest() {
168 SkAutoTDelete<SkAdvancedTypefaceMetrics::AdvanceMetric<int16_t> > result ; 168 SkAutoTDelete<SkAdvancedTypefaceMetrics::AdvanceMetric<int16_t> > result ;
169 result.reset(getAdvanceData((void*)this, fAdvancesLen, fSubset, fSubsetL en, getAdvance)); 169 result.reset(getAdvanceData((void*)this, fAdvancesLen, fSubset, fSubsetL en, getAdvance));
170 170
171 SkString stringResult = stringify_advance_data(result.get()); 171 SkString stringResult = stringify_advance_data(result.get());
172 if (!stringResult.equals(fExpected)) { 172 if (!stringResult.equals(fExpected)) {
173 printf("Expected: %s\n Result: %s\n", fExpected, stringResult.c_str ()); 173 SkDebugf("Expected: %s\n Result: %s\n", fExpected, stringResult.c_s tr());
174 return false; 174 return false;
175 } 175 }
176 return true; 176 return true;
177 } 177 }
178 }; 178 };
179 179
180 static void TestWArray(skiatest::Reporter* reporter) { 180 static void TestWArray(skiatest::Reporter* reporter) {
181 TestWData(reporter, data1, SK_ARRAY_COUNT(data1), NULL, 0, expected1); 181 TestWData(reporter, data1, SK_ARRAY_COUNT(data1), NULL, 0, expected1);
182 TestWData(reporter, data2, SK_ARRAY_COUNT(data2), NULL, 0, expected2); 182 TestWData(reporter, data2, SK_ARRAY_COUNT(data2), NULL, 0, expected2);
183 TestWData(reporter, data3, SK_ARRAY_COUNT(data3), NULL, 0, expected3); 183 TestWData(reporter, data3, SK_ARRAY_COUNT(data3), NULL, 0, expected3);
(...skipping 21 matching lines...) Expand all
205 TestWData(reporter, data13, SK_ARRAY_COUNT(data13), NULL, 0, expected13); 205 TestWData(reporter, data13, SK_ARRAY_COUNT(data13), NULL, 0, expected13);
206 TestWData(reporter, data13, SK_ARRAY_COUNT(data13), subset13, 206 TestWData(reporter, data13, SK_ARRAY_COUNT(data13), subset13,
207 SK_ARRAY_COUNT(subset13), expectedSubset13); 207 SK_ARRAY_COUNT(subset13), expectedSubset13);
208 TestWData(reporter, data14, SK_ARRAY_COUNT(data14), NULL, 0, expected14); 208 TestWData(reporter, data14, SK_ARRAY_COUNT(data14), NULL, 0, expected14);
209 TestWData(reporter, data14, SK_ARRAY_COUNT(data14), subset14, 209 TestWData(reporter, data14, SK_ARRAY_COUNT(data14), subset14,
210 SK_ARRAY_COUNT(subset14), expectedSubset14); 210 SK_ARRAY_COUNT(subset14), expectedSubset14);
211 } 211 }
212 212
213 #include "TestClassDef.h" 213 #include "TestClassDef.h"
214 DEFINE_TESTCLASS("WArray", WArrayTest, TestWArray) 214 DEFINE_TESTCLASS("WArray", WArrayTest, TestWArray)
OLDNEW
« no previous file with comments | « tests/StringTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698