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

Unified Diff: tests/Sk64Test.cpp

Issue 113873008: remove unused SkFixed and SkFract functions (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
« experimental/Intersection/SkAntiEdge.cpp ('K') | « tests/MathTest.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/Sk64Test.cpp
diff --git a/tests/Sk64Test.cpp b/tests/Sk64Test.cpp
index 9af32b14beabfb5e880298ba4bfaa3082e29bfcc..589801b272c2d7d5d86c700b2daee77b13140d45 100644
--- a/tests/Sk64Test.cpp
+++ b/tests/Sk64Test.cpp
@@ -174,28 +174,6 @@ DEF_TEST(Sk64Test, reporter) {
int32_t ck = (int32_t)sqrt((double)wide.getLongLong());
int diff = denom - ck;
REPORTER_ASSERT(reporter, SkAbs32(diff) <= 1);
-
- wide.setMul(rand.nextS(), rand.nextS());
- Sk64 dwide;
- dwide.setMul(rand.nextS(), rand.nextS());
- SkFixed fixdiv = wide.getFixedDiv(dwide);
- double dnumer = (double)wide.getLongLong();
- double ddenom = (double)dwide.getLongLong();
- double ddiv = dnumer / ddenom;
- SkFixed dfixdiv;
- if (ddiv >= (double)SK_MaxS32 / (double)SK_Fixed1)
- dfixdiv = SK_MaxS32;
- else if (ddiv <= -(double)SK_MaxS32 / (double)SK_Fixed1)
- dfixdiv = SK_MinS32;
- else
- dfixdiv = SkFloatToFixed(dnumer / ddenom);
- diff = fixdiv - dfixdiv;
-
- if (SkAbs32(diff) > 1) {
- SkDebugf(" %d === numer %g denom %g div %g xdiv %x fxdiv %x\n",
- i, dnumer, ddenom, ddiv, dfixdiv, fixdiv);
- }
- REPORTER_ASSERT(reporter, SkAbs32(diff) <= 1);
}
#endif
}
« experimental/Intersection/SkAntiEdge.cpp ('K') | « tests/MathTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698