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

Unified Diff: utils_unittest.cc

Issue 3053049: Nice automatic updates up to a point, then renice if necessary. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/update_engine.git
Patch Set: better documentation Created 10 years, 4 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 | « utils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils_unittest.cc
diff --git a/utils_unittest.cc b/utils_unittest.cc
index 575d91fbb99bee3a244b3c2fe4f3fdd5a6e2e0f3..70eb6c7101ccfc88d268f9414bf107002faa6aa8 100644
--- a/utils_unittest.cc
+++ b/utils_unittest.cc
@@ -157,4 +157,15 @@ TEST(UtilsTest, PartitionNumberTest) {
EXPECT_EQ("3", utils::PartitionNumber("/dev/mmc0p3"));
}
+TEST(UtilsTest, ComparePriorities) {
+ EXPECT_LT(utils::ComparePriorities(utils::kProcessPriorityLow,
+ utils::kProcessPriorityNormal), 0);
+ EXPECT_GT(utils::ComparePriorities(utils::kProcessPriorityNormal,
+ utils::kProcessPriorityLow), 0);
+ EXPECT_EQ(utils::ComparePriorities(utils::kProcessPriorityNormal,
+ utils::kProcessPriorityNormal), 0);
+ EXPECT_GT(utils::ComparePriorities(utils::kProcessPriorityHigh,
+ utils::kProcessPriorityNormal), 0);
+}
+
} // namespace chromeos_update_engine
« no previous file with comments | « utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698