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

Unified Diff: tests/MathTest.cpp

Issue 2433233003: Make SkFixedRound/Ceil/FloorToFixed as inline func (Closed)
Patch Set: Remove one more bracket Created 4 years, 2 months 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 | « include/private/SkFixed.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/MathTest.cpp
diff --git a/tests/MathTest.cpp b/tests/MathTest.cpp
index 1dd8223091e5914686caf3b6f50f31fff4abdbb2..41a4104bd4a7fea4cdae7b044fb7b607d042f083 100644
--- a/tests/MathTest.cpp
+++ b/tests/MathTest.cpp
@@ -534,6 +534,12 @@ DEF_TEST(Math, reporter) {
REPORTER_ASSERT(reporter, result == 3);
}
+ {
+ REPORTER_ASSERT(reporter, (SkFixedRoundToFixed(-SK_Fixed1 * 10) >> 1) == -SK_Fixed1 * 5);
+ REPORTER_ASSERT(reporter, (SkFixedFloorToFixed(-SK_Fixed1 * 10) >> 1) == -SK_Fixed1 * 5);
+ REPORTER_ASSERT(reporter, (SkFixedCeilToFixed(-SK_Fixed1 * 10) >> 1) == -SK_Fixed1 * 5);
+ }
+
unittest_fastfloat(reporter);
unittest_isfinite(reporter);
unittest_half(reporter);
« no previous file with comments | « include/private/SkFixed.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698