| 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 #include "PathOpsTestCommon.h" | 7 #include "PathOpsTestCommon.h" |
| 8 #include "SkPathOpsBounds.h" | 8 #include "SkPathOpsBounds.h" |
| 9 #include "Test.h" | 9 #include "Test.h" |
| 10 #include "TestClassDef.h" | |
| 11 | 10 |
| 12 static const SkRect sectTests[][2] = { | 11 static const SkRect sectTests[][2] = { |
| 13 {{2, 0, 4, 1}, {4, 0, 6, 1}}, | 12 {{2, 0, 4, 1}, {4, 0, 6, 1}}, |
| 14 {{2, 0, 4, 1}, {3, 0, 5, 1}}, | 13 {{2, 0, 4, 1}, {3, 0, 5, 1}}, |
| 15 {{2, 0, 4, 1}, {3, 0, 5, 0}}, | 14 {{2, 0, 4, 1}, {3, 0, 5, 0}}, |
| 16 {{2, 0, 4, 1}, {3, 1, 5, 2}}, | 15 {{2, 0, 4, 1}, {3, 1, 5, 2}}, |
| 17 {{2, 1, 4, 2}, {1, 0, 5, 3}}, | 16 {{2, 1, 4, 2}, {1, 0, 5, 3}}, |
| 18 {{2, 1, 5, 3}, {3, 1, 4, 2}}, | 17 {{2, 1, 5, 3}, {3, 1, 4, 2}}, |
| 19 {{2, 0, 4, 1}, {3, 0, 3, 0}}, // intersecting an empty bounds is OK | 18 {{2, 0, 4, 1}, {3, 0, 3, 0}}, // intersecting an empty bounds is OK |
| 20 {{2, 0, 4, 1}, {4, 1, 5, 2}}, // touching just on a corner is OK | 19 {{2, 0, 4, 1}, {4, 1, 5, 2}}, // touching just on a corner is OK |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 102 expected.set(0, 0, 3, 4); | 101 expected.set(0, 0, 3, 4); |
| 103 REPORTER_ASSERT(reporter, bounds == expected); | 102 REPORTER_ASSERT(reporter, bounds == expected); |
| 104 (bounds.*SetCurveBounds[2])(curvePts); | 103 (bounds.*SetCurveBounds[2])(curvePts); |
| 105 REPORTER_ASSERT(reporter, bounds == expected); | 104 REPORTER_ASSERT(reporter, bounds == expected); |
| 106 bounds.setCubicBounds(curvePts); | 105 bounds.setCubicBounds(curvePts); |
| 107 expected.set(0, 0, 5, 6); | 106 expected.set(0, 0, 5, 6); |
| 108 REPORTER_ASSERT(reporter, bounds == expected); | 107 REPORTER_ASSERT(reporter, bounds == expected); |
| 109 (bounds.*SetCurveBounds[3])(curvePts); | 108 (bounds.*SetCurveBounds[3])(curvePts); |
| 110 REPORTER_ASSERT(reporter, bounds == expected); | 109 REPORTER_ASSERT(reporter, bounds == expected); |
| 111 } | 110 } |
| OLD | NEW |