| OLD | NEW |
| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 *advance = testCase->fAdvances[gId]; | 157 *advance = testCase->fAdvances[gId]; |
| 158 return true; | 158 return true; |
| 159 } | 159 } |
| 160 return false; | 160 return false; |
| 161 } | 161 } |
| 162 | 162 |
| 163 bool RunTest() { | 163 bool RunTest() { |
| 164 SkAutoTDelete<SkAdvancedTypefaceMetrics::AdvanceMetric<int16_t> > result
; | 164 SkAutoTDelete<SkAdvancedTypefaceMetrics::AdvanceMetric<int16_t> > result
; |
| 165 result.reset(getAdvanceData((void*)this, fAdvancesLen, fSubset, fSubsetL
en, getAdvance)); | 165 result.reset(getAdvanceData((void*)this, fAdvancesLen, fSubset, fSubsetL
en, getAdvance)); |
| 166 | 166 |
| 167 SkString stringResult = stringify_advance_data(result.get()); | 167 SkString stringResult = stringify_advance_data(result); |
| 168 if (!stringResult.equals(fExpected)) { | 168 if (!stringResult.equals(fExpected)) { |
| 169 SkDebugf("Expected: %s\n Result: %s\n", fExpected, stringResult.c_s
tr()); | 169 SkDebugf("Expected: %s\n Result: %s\n", fExpected, stringResult.c_s
tr()); |
| 170 return false; | 170 return false; |
| 171 } | 171 } |
| 172 return true; | 172 return true; |
| 173 } | 173 } |
| 174 }; | 174 }; |
| 175 | 175 |
| 176 DEF_TEST(WArray, reporter) { | 176 DEF_TEST(WArray, reporter) { |
| 177 TestWData(reporter, data1, SK_ARRAY_COUNT(data1), NULL, 0, expected1); | 177 TestWData(reporter, data1, SK_ARRAY_COUNT(data1), NULL, 0, expected1); |
| (...skipping 20 matching lines...) Expand all Loading... |
| 198 TestWData(reporter, data12, SK_ARRAY_COUNT(data12), NULL, 0, expected12); | 198 TestWData(reporter, data12, SK_ARRAY_COUNT(data12), NULL, 0, expected12); |
| 199 TestWData(reporter, data12, SK_ARRAY_COUNT(data12), subset12, | 199 TestWData(reporter, data12, SK_ARRAY_COUNT(data12), subset12, |
| 200 SK_ARRAY_COUNT(subset12), expectedSubset12); | 200 SK_ARRAY_COUNT(subset12), expectedSubset12); |
| 201 TestWData(reporter, data13, SK_ARRAY_COUNT(data13), NULL, 0, expected13); | 201 TestWData(reporter, data13, SK_ARRAY_COUNT(data13), NULL, 0, expected13); |
| 202 TestWData(reporter, data13, SK_ARRAY_COUNT(data13), subset13, | 202 TestWData(reporter, data13, SK_ARRAY_COUNT(data13), subset13, |
| 203 SK_ARRAY_COUNT(subset13), expectedSubset13); | 203 SK_ARRAY_COUNT(subset13), expectedSubset13); |
| 204 TestWData(reporter, data14, SK_ARRAY_COUNT(data14), NULL, 0, expected14); | 204 TestWData(reporter, data14, SK_ARRAY_COUNT(data14), NULL, 0, expected14); |
| 205 TestWData(reporter, data14, SK_ARRAY_COUNT(data14), subset14, | 205 TestWData(reporter, data14, SK_ARRAY_COUNT(data14), subset14, |
| 206 SK_ARRAY_COUNT(subset14), expectedSubset14); | 206 SK_ARRAY_COUNT(subset14), expectedSubset14); |
| 207 } | 207 } |
| OLD | NEW |