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

Side by Side Diff: tests/UnicodeTest.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/Typeface.cpp ('k') | tests/UnitTestTest.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
2 /* 1 /*
3 * Copyright 2011 Google Inc. 2 * Copyright 2011 Google Inc.
4 * 3 *
5 * 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
6 * found in the LICENSE file. 5 * found in the LICENSE file.
7 */ 6 */
7
8 #include "Test.h" 8 #include "Test.h"
9 #include "TestClassDef.h"
9 #include "SkPaint.h" 10 #include "SkPaint.h"
10 #include "SkUtils.h" 11 #include "SkUtils.h"
11 12
12 // Unicode Variation Selector ranges: inclusive 13 // Unicode Variation Selector ranges: inclusive
13 #define UVS_MIN0 0x180B 14 #define UVS_MIN0 0x180B
14 #define UVS_MAX0 0x180D 15 #define UVS_MAX0 0x180D
15 #define UVS_MIN1 0xFE00 16 #define UVS_MIN1 0xFE00
16 #define UVS_MAX1 0xFE0F 17 #define UVS_MAX1 0xFE0F
17 #define UVS_MIN2 0xE0100 18 #define UVS_MIN2 0xE0100
18 #define UVS_MAX2 0xE01EF 19 #define UVS_MAX2 0xE01EF
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 int count32 = paint.textToGlyphs(text32, len32, glyphs32); 71 int count32 = paint.textToGlyphs(text32, len32, glyphs32);
71 72
72 REPORTER_ASSERT(reporter, (int)len8 == count8); 73 REPORTER_ASSERT(reporter, (int)len8 == count8);
73 REPORTER_ASSERT(reporter, (int)len8 == count16); 74 REPORTER_ASSERT(reporter, (int)len8 == count16);
74 REPORTER_ASSERT(reporter, (int)len8 == count32); 75 REPORTER_ASSERT(reporter, (int)len8 == count32);
75 76
76 REPORTER_ASSERT(reporter, !memcmp(glyphs8, glyphs16, count8 * sizeof(uint16_ t))); 77 REPORTER_ASSERT(reporter, !memcmp(glyphs8, glyphs16, count8 * sizeof(uint16_ t)));
77 REPORTER_ASSERT(reporter, !memcmp(glyphs8, glyphs32, count8 * sizeof(uint16_ t))); 78 REPORTER_ASSERT(reporter, !memcmp(glyphs8, glyphs32, count8 * sizeof(uint16_ t)));
78 } 79 }
79 80
80 static void TestUnicode(skiatest::Reporter* reporter) { 81 DEF_TEST(Unicode, reporter) {
81 test_uvs(reporter); 82 test_uvs(reporter);
82 test_textencodings(reporter); 83 test_textencodings(reporter);
83 } 84 }
84
85 #include "TestClassDef.h"
86 DEFINE_TESTCLASS("Unicode", TestUnicodeClass, TestUnicode)
OLDNEW
« no previous file with comments | « tests/Typeface.cpp ('k') | tests/UnitTestTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698