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

Unified Diff: ash/shelf/shelf_layout_manager_unittest.cc

Issue 274533004: clang: Turn on -Wabsolute-value. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ash3 Created 6 years, 7 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 | « no previous file | ash/shelf/shelf_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_layout_manager_unittest.cc
diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc
index cc268fa76a2607250a86d0760431717db620696f..3e0024a986d745dc56db7f99ba8b56ad7ef105b6 100644
--- a/ash/shelf/shelf_layout_manager_unittest.cc
+++ b/ash/shelf/shelf_layout_manager_unittest.cc
@@ -201,25 +201,25 @@ class ShelfDragCallback {
// If dragging inwards from the visible state, then the shelf should
// increase in size, but not more than the scroll delta.
EXPECT_LE(visible_bounds_size, shelf_size);
- EXPECT_LE(abs(shelf_size - visible_bounds_size),
- abs(scroll_delta));
+ EXPECT_LE(std::abs(shelf_size - visible_bounds_size),
+ std::abs(scroll_delta));
} else {
if (shelf_size > not_visible_bounds_size) {
// If dragging outwards from the visible state, then the shelf
// should decrease in size, until it reaches the minimum size.
- EXPECT_EQ(shelf_size, visible_bounds_size - abs(scroll_delta));
+ EXPECT_EQ(shelf_size, visible_bounds_size - std::abs(scroll_delta));
}
}
} else {
- if (fabs(scroll_delta) <
+ if (std::abs(scroll_delta) <
visible_bounds_size - not_visible_bounds_size) {
// Tests that the shelf sticks with the touch point during the drag
// until the shelf is completely visible.
- EXPECT_EQ(shelf_size, not_visible_bounds_size + abs(scroll_delta));
+ EXPECT_EQ(shelf_size, not_visible_bounds_size + std::abs(scroll_delta));
} else {
// Tests that after the shelf is completely visible, the shelf starts
// resisting the drag.
- EXPECT_LT(shelf_size, not_visible_bounds_size + abs(scroll_delta));
+ EXPECT_LT(shelf_size, not_visible_bounds_size + std::abs(scroll_delta));
}
}
}
« no previous file with comments | « no previous file | ash/shelf/shelf_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698