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

Unified Diff: tests/PointTest.cpp

Issue 85463005: remove SkFloatToScalar macro (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: add flag to expose SkFloatToScalar to chromium Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/PathTest.cpp ('k') | tests/RoundRectTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PointTest.cpp
diff --git a/tests/PointTest.cpp b/tests/PointTest.cpp
index 9f91c47c1c6d9d7285b326c81e1a3cf81c1600ec..d4b9128b3ef84f0f0d281f8153871612feacbf81 100644
--- a/tests/PointTest.cpp
+++ b/tests/PointTest.cpp
@@ -84,7 +84,7 @@ static float force_as_float(skiatest::Reporter* reporter, float value) {
// test that we handle very large values correctly. i.e. that we can
// successfully normalize something whose mag overflows a float.
static void test_overflow(skiatest::Reporter* reporter) {
- SkScalar bigFloat = get_value(reporter, SkFloatToScalar(3.4e38f));
+ SkScalar bigFloat = get_value(reporter, 3.4e38f);
SkPoint pt = { bigFloat, bigFloat };
SkScalar length = pt.length();
@@ -107,7 +107,7 @@ static void test_overflow(skiatest::Reporter* reporter) {
// test that we handle very small values correctly. i.e. that we can
// report failure if we try to normalize them.
static void test_underflow(skiatest::Reporter* reporter) {
- SkPoint pt = { SkFloatToScalar(1.0e-37f), SkFloatToScalar(1.0e-37f) };
+ SkPoint pt = { 1.0e-37f, 1.0e-37f };
SkPoint copy = pt;
REPORTER_ASSERT(reporter, 0 == SkPoint::Normalize(&pt));
@@ -127,7 +127,7 @@ DEF_TEST(Point, reporter) {
SkScalar fLength;
} gRec[] = {
{ SkIntToScalar(3), SkIntToScalar(4), SkIntToScalar(5) },
- { SkFloatToScalar(0.6f), SkFloatToScalar(0.8f), SK_Scalar1 },
+ { 0.6f, 0.8f, SK_Scalar1 },
};
for (size_t i = 0; i < SK_ARRAY_COUNT(gRec); ++i) {
« no previous file with comments | « tests/PathTest.cpp ('k') | tests/RoundRectTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698