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

Side by Side Diff: tests/ErrorTest.cpp

Issue 145313004: Cleanup: Sanitize the order of includes under tests/ (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: more two fixes 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/EmptyPathTest.cpp ('k') | tests/FillPathTest.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"
9 #include "SkError.h" 8 #include "SkError.h"
10 #include "SkPath.h" 9 #include "SkPath.h"
11 #include "SkRect.h" 10 #include "SkRect.h"
11 #include "Test.h"
12 12
13 typedef struct { 13 typedef struct {
14 skiatest::Reporter *fReporter; 14 skiatest::Reporter *fReporter;
15 unsigned int *fIntPointer; 15 unsigned int *fIntPointer;
16 } ErrorContext; 16 } ErrorContext;
17 17
18 #define CHECK(errcode) \ 18 #define CHECK(errcode) \
19 REPORTER_ASSERT( reporter, (err = SkGetLastError()) == errcode); \ 19 REPORTER_ASSERT( reporter, (err = SkGetLastError()) == errcode); \
20 if (err != kNoError_SkError) \ 20 if (err != kNoError_SkError) \
21 { \ 21 { \
(...skipping 30 matching lines...) Expand all
52 // should trigger the default error callback, which just prints to the scree n. 52 // should trigger the default error callback, which just prints to the scree n.
53 path.addRoundRect(r, -10, -10); 53 path.addRoundRect(r, -10, -10);
54 CHECK(kInvalidArgument_SkError); 54 CHECK(kInvalidArgument_SkError);
55 CHECK(kNoError_SkError); 55 CHECK(kNoError_SkError);
56 56
57 // should trigger *our* callback. 57 // should trigger *our* callback.
58 path.addRoundRect(r, -10, -10); 58 path.addRoundRect(r, -10, -10);
59 CHECK(kInvalidArgument_SkError); 59 CHECK(kInvalidArgument_SkError);
60 CHECK(kNoError_SkError); 60 CHECK(kNoError_SkError);
61 } 61 }
OLDNEW
« no previous file with comments | « tests/EmptyPathTest.cpp ('k') | tests/FillPathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698