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

Side by Side Diff: tests/LayerDrawLooperTest.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/LListTest.cpp ('k') | tests/MD5Test.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 2013 Google Inc. 2 * Copyright 2013 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"
9 #include "SkBitmap.h" 10 #include "SkBitmap.h"
10 #include "SkBitmapDevice.h" 11 #include "SkBitmapDevice.h"
11 #include "SkCanvas.h" 12 #include "SkCanvas.h"
12 #include "SkDraw.h" 13 #include "SkDraw.h"
13 #include "SkLayerDrawLooper.h" 14 #include "SkLayerDrawLooper.h"
14 #include "SkMatrix.h" 15 #include "SkMatrix.h"
15 #include "SkPaint.h" 16 #include "SkPaint.h"
16 #include "SkRect.h" 17 #include "SkRect.h"
17 #include "SkRefCnt.h" 18 #include "SkRefCnt.h"
18 #include "SkScalar.h" 19 #include "SkScalar.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 REPORTER_ASSERT(reporter, looper->next(&canvas, &paint)); 139 REPORTER_ASSERT(reporter, looper->next(&canvas, &paint));
139 REPORTER_ASSERT(reporter, SkXfermode::IsMode(paint.getXfermode(), SkXfermode ::kSrc_Mode)); 140 REPORTER_ASSERT(reporter, SkXfermode::IsMode(paint.getXfermode(), SkXfermode ::kSrc_Mode));
140 canvas.drawRect(SkRect::MakeWH(50.0f, 50.0f), paint); 141 canvas.drawRect(SkRect::MakeWH(50.0f, 50.0f), paint);
141 REPORTER_ASSERT(reporter, 10.0f == device.fLastMatrix.getTranslateX()); 142 REPORTER_ASSERT(reporter, 10.0f == device.fLastMatrix.getTranslateX());
142 REPORTER_ASSERT(reporter, 20.0f == device.fLastMatrix.getTranslateY()); 143 REPORTER_ASSERT(reporter, 20.0f == device.fLastMatrix.getTranslateY());
143 144
144 // Only two layers were added, so that should be the end. 145 // Only two layers were added, so that should be the end.
145 REPORTER_ASSERT(reporter, !looper->next(&canvas, &paint)); 146 REPORTER_ASSERT(reporter, !looper->next(&canvas, &paint));
146 } 147 }
147 148
148 static void TestLayerDrawLooper(skiatest::Reporter* reporter) { 149 DEF_TEST(LayerDrawLooper, reporter) {
149 test_frontToBack(reporter); 150 test_frontToBack(reporter);
150 test_backToFront(reporter); 151 test_backToFront(reporter);
151 test_mixed(reporter); 152 test_mixed(reporter);
152 } 153 }
153
154 #include "TestClassDef.h"
155 DEFINE_TESTCLASS("LayerDrawLooper", TestLayerDrawLooperClass, TestLayerDrawLoope r)
OLDNEW
« no previous file with comments | « tests/LListTest.cpp ('k') | tests/MD5Test.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698