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

Unified Diff: tests/InfRectTest.cpp

Issue 117053002: remove SK_SCALAR_IS_[FLOAT,FIXED] and assume floats (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years 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
Index: tests/InfRectTest.cpp
diff --git a/tests/InfRectTest.cpp b/tests/InfRectTest.cpp
index 3d964bdccf4b9f40380a5975d9f609e9366ca066..674cf5b80245326b4ecbf4450cfaf7cb57811648 100644
--- a/tests/InfRectTest.cpp
+++ b/tests/InfRectTest.cpp
@@ -10,11 +10,9 @@
#include "SkRandom.h"
#include "SkRect.h"
-#ifdef SK_SCALAR_IS_FLOAT
static float make_zero() {
return sk_float_sin(0);
}
-#endif
struct RectCenter {
SkIRect fRect;
@@ -59,14 +57,9 @@ static void check_invalid(skiatest::Reporter* reporter,
// Tests that isFinite() will reject any rect with +/-inf values
// as one of its coordinates.
DEF_TEST(InfRect, reporter) {
-#ifdef SK_SCALAR_IS_FLOAT
float inf = 1 / make_zero(); // infinity
float nan = inf * 0;
SkASSERT(!(nan == nan));
-#else
- SkFixed inf = SK_FixedNaN;
- SkFixed nan = SK_FixedNaN;
-#endif
SkScalar small = SkIntToScalar(10);
SkScalar big = SkIntToScalar(100);
« src/core/SkCanvas.cpp ('K') | « tests/DrawPathTest.cpp ('k') | tests/MathTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698