aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-01-09 15:36:51 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-09 21:57:58 +0000
commitf581777217ed21713a9892075816644cdea9efdd (patch)
tree2a7fd68d6600862f2e54855f1a8528083da4a059 /tests
parent1af6daa8320c15d8edecddd5d5a68f16de98a045 (diff)
shrink our 'largest' so that its non-empty
Bug: skia: Change-Id: Ib12fd9491069440c85d5aa9c9d6d26787f03ef0d Reviewed-on: https://skia-review.googlesource.com/92643 Reviewed-by: Yuqian Li <liyuqian@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/RectTest.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/RectTest.cpp b/tests/RectTest.cpp
index ae54f4b779..39ba073725 100644
--- a/tests/RectTest.cpp
+++ b/tests/RectTest.cpp
@@ -8,6 +8,7 @@
#include "SkBitmap.h"
#include "SkCanvas.h"
#include "SkRect.h"
+#include "SkRectPriv.h"
#include "Test.h"
static bool has_green_pixels(const SkBitmap& bm) {
@@ -93,3 +94,13 @@ DEF_TEST(Rect_grow, reporter) {
test_stroke_width_clipping(reporter);
test_skbug4406(reporter);
}
+
+DEF_TEST(Rect_largest, reporter) {
+ REPORTER_ASSERT(reporter, !SkRectPriv::MakeILargest().isEmpty());
+ REPORTER_ASSERT(reporter, SkRectPriv::MakeILargestInverted().isEmpty());
+
+ REPORTER_ASSERT(reporter, !SkRectPriv::MakeLargest().isEmpty());
+ REPORTER_ASSERT(reporter, !SkRectPriv::MakeLargestS32().isEmpty());
+ REPORTER_ASSERT(reporter, SkRectPriv::MakeLargestInverted().isEmpty());
+}
+