| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |