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

Side by Side Diff: tests/FontObjTest.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 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
« no previous file with comments | « tests/FontMgrTest.cpp ('k') | tests/GLInterfaceValidationTest.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 2014 Google Inc. 2 * Copyright 2014 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 "SkFont.h" 8 #include "SkFont.h"
9 #include "SkPaint.h" 9 #include "SkPaint.h"
10 #include "SkTypeface.h" 10 #include "SkTypeface.h"
(...skipping 25 matching lines...) Expand all
36 REPORTER_ASSERT(reporter, font->isVertical() == paint.isVerticalText()); 36 REPORTER_ASSERT(reporter, font->isVertical() == paint.isVerticalText());
37 REPORTER_ASSERT(reporter, font->isEmbolden() == paint.isFakeBoldText()); 37 REPORTER_ASSERT(reporter, font->isEmbolden() == paint.isFakeBoldText());
38 38
39 REPORTER_ASSERT(reporter, font->isUseNonLinearMetrics() == is_use_nonlinear_ metrics(paint)); 39 REPORTER_ASSERT(reporter, font->isUseNonLinearMetrics() == is_use_nonlinear_ metrics(paint));
40 REPORTER_ASSERT(reporter, font->isEnableAutoHints() == is_enable_auto_hints( paint)); 40 REPORTER_ASSERT(reporter, font->isEnableAutoHints() == is_enable_auto_hints( paint));
41 REPORTER_ASSERT(reporter, font->isEnableByteCodeHints() == is_enable_bytecod e_hints(paint)); 41 REPORTER_ASSERT(reporter, font->isEnableByteCodeHints() == is_enable_bytecod e_hints(paint));
42 } 42 }
43 43
44 static void test_cachedfont(skiatest::Reporter* reporter) { 44 static void test_cachedfont(skiatest::Reporter* reporter) {
45 static const char* const faces[] = { 45 static const char* const faces[] = {
46 NULL, // default font 46 nullptr, // default font
47 "Arial", "Times", "Times New Roman", "Helvetica", "Courier", 47 "Arial", "Times", "Times New Roman", "Helvetica", "Courier",
48 "Courier New", "Verdana", "monospace", 48 "Courier New", "Verdana", "monospace",
49 }; 49 };
50 50
51 static const struct { 51 static const struct {
52 SkPaint::Hinting hinting; 52 SkPaint::Hinting hinting;
53 unsigned flags; 53 unsigned flags;
54 } settings[] = { 54 } settings[] = {
55 { SkPaint::kNo_Hinting, 0 }, 55 { SkPaint::kNo_Hinting, 0 },
56 { SkPaint::kNo_Hinting, SkPaint::kLinearText_Flag }, 56 { SkPaint::kNo_Hinting, SkPaint::kLinearText_Flag },
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 } 111 }
112 } 112 }
113 } 113 }
114 } 114 }
115 115
116 DEF_TEST(FontObj, reporter) { 116 DEF_TEST(FontObj, reporter) {
117 test_cachedfont(reporter); 117 test_cachedfont(reporter);
118 } 118 }
119 119
120 // need tests for SkStrSearch 120 // need tests for SkStrSearch
OLDNEW
« no previous file with comments | « tests/FontMgrTest.cpp ('k') | tests/GLInterfaceValidationTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698