aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-12-06 18:56:37 +0000
committerGravatar reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2011-12-06 18:56:37 +0000
commit1607863b608b7db6c813228768ed5d72997bbc82 (patch)
treedfe7f47dcb9e9d07bf9fb92194666cb8e7b73556 /tests
parent9791291347db8b5e92f16b139df30e28186626c8 (diff)
rename hasValidCoordinates to isFinite (on SkRect) and reimplement for speed
git-svn-id: http://skia.googlecode.com/svn/trunk@2811 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests')
-rw-r--r--tests/InfRectTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/InfRectTest.cpp b/tests/InfRectTest.cpp
index a78eba6dac..12356d9c2f 100644
--- a/tests/InfRectTest.cpp
+++ b/tests/InfRectTest.cpp
@@ -18,10 +18,10 @@ static void check_invalid(skiatest::Reporter* reporter,
SkScalar l, SkScalar t, SkScalar r, SkScalar b) {
SkRect rect;
rect.set(l, t, r, b);
- REPORTER_ASSERT(reporter, !rect.hasValidCoordinates());
+ REPORTER_ASSERT(reporter, !rect.isFinite());
}
-// Tests that hasValidCoordinates() will reject any rect with +/-inf values
+// Tests that isFinite() will reject any rect with +/-inf values
// as one of its coordinates.
static void TestInfRect(skiatest::Reporter* reporter) {
#ifdef SK_SCALAR_IS_FLOAT
@@ -33,7 +33,7 @@ static void TestInfRect(skiatest::Reporter* reporter) {
SkScalar big = SkIntToScalar(100);
SkRect rect = SkRect::MakeXYWH(small, small, big, big);
- REPORTER_ASSERT(reporter, rect.hasValidCoordinates());
+ REPORTER_ASSERT(reporter, rect.isFinite());
check_invalid(reporter, small, small, big, invalid);
check_invalid(reporter, small, small, invalid, big);