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

Side by Side Diff: tests/ColorTest.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/ColorFilterTest.cpp ('k') | tests/DataRefTest.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 "SkColor.h" 10 #include "SkColor.h"
10 #include "SkColorPriv.h" 11 #include "SkColorPriv.h"
11 #include "SkMathPriv.h" 12 #include "SkMathPriv.h"
12 #include "SkRandom.h" 13 #include "SkRandom.h"
13 #include "SkUnPreMultiply.h" 14 #include "SkUnPreMultiply.h"
14 15
15 #define GetPackedR16As32(packed) (SkGetPackedR16(dc) << (8 - SK_R16_BITS)) 16 #define GetPackedR16As32(packed) (SkGetPackedR16(dc) << (8 - SK_R16_BITS))
16 #define GetPackedG16As32(packed) (SkGetPackedG16(dc) << (8 - SK_G16_BITS)) 17 #define GetPackedG16As32(packed) (SkGetPackedG16(dc) << (8 - SK_G16_BITS))
17 #define GetPackedB16As32(packed) (SkGetPackedB16(dc) << (8 - SK_B16_BITS)) 18 #define GetPackedB16As32(packed) (SkGetPackedB16(dc) << (8 - SK_B16_BITS))
18 19
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 SkColor colorSrc = r.nextU(); 70 SkColor colorSrc = r.nextU();
70 SkColor colorDst = r.nextU(); 71 SkColor colorDst = r.nextU();
71 SkPMColor src = SkPreMultiplyColor(colorSrc); 72 SkPMColor src = SkPreMultiplyColor(colorSrc);
72 SkPMColor dst = SkPreMultiplyColor(colorDst); 73 SkPMColor dst = SkPreMultiplyColor(colorDst);
73 74
74 REPORTER_ASSERT(reporter, SkFastFourByteInterp(src, dst, a0) == dst); 75 REPORTER_ASSERT(reporter, SkFastFourByteInterp(src, dst, a0) == dst);
75 REPORTER_ASSERT(reporter, SkFastFourByteInterp(src, dst, a255) == src); 76 REPORTER_ASSERT(reporter, SkFastFourByteInterp(src, dst, a255) == src);
76 } 77 }
77 } 78 }
78 79
79 static void TestColor(skiatest::Reporter* reporter) { 80 DEF_TEST(Color, reporter) {
80 test_premul(reporter); 81 test_premul(reporter);
81 //test_interp(reporter); 82 //test_interp(reporter);
82 test_fast_interp(reporter); 83 test_fast_interp(reporter);
83 // test_565blend(); 84 //test_565blend();
84 } 85 }
85
86 #include "TestClassDef.h"
87 DEFINE_TESTCLASS("Color", ColorTestClass, TestColor)
OLDNEW
« no previous file with comments | « tests/ColorFilterTest.cpp ('k') | tests/DataRefTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698