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

Side by Side Diff: tests/ShaderOpacityTest.cpp

Issue 138563004: Move macros from TestClassDef.h to Test.h (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: upload Created 6 years, 11 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/ShaderImageFilterTest.cpp ('k') | tests/SkpSkGrTest.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 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 #include "TestClassDef.h"
10 #include "SkShader.h" 9 #include "SkShader.h"
11 #include "SkGradientShader.h" 10 #include "SkGradientShader.h"
12 #include "SkColorShader.h" 11 #include "SkColorShader.h"
13 12
14 static void test_bitmap(skiatest::Reporter* reporter) { 13 static void test_bitmap(skiatest::Reporter* reporter) {
15 SkBitmap bmp; 14 SkBitmap bmp;
16 bmp.setConfig(SkBitmap::kARGB_8888_Config, 2, 2); 15 bmp.setConfig(SkBitmap::kARGB_8888_Config, 2, 2);
17 16
18 // test 1: bitmap without pixel data 17 // test 1: bitmap without pixel data
19 SkShader* shader = SkShader::CreateBitmapShader(bmp, 18 SkShader* shader = SkShader::CreateBitmapShader(bmp,
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 // since lack of opacity will depend solely on the paint 106 // since lack of opacity will depend solely on the paint
108 SkColorShader colorShader4; 107 SkColorShader colorShader4;
109 REPORTER_ASSERT(reporter, colorShader4.isOpaque()); 108 REPORTER_ASSERT(reporter, colorShader4.isOpaque());
110 } 109 }
111 110
112 DEF_TEST(ShaderOpacity, reporter) { 111 DEF_TEST(ShaderOpacity, reporter) {
113 test_gradient(reporter); 112 test_gradient(reporter);
114 test_color(reporter); 113 test_color(reporter);
115 test_bitmap(reporter); 114 test_bitmap(reporter);
116 } 115 }
OLDNEW
« no previous file with comments | « tests/ShaderImageFilterTest.cpp ('k') | tests/SkpSkGrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698