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

Unified Diff: src/platform/update_engine/utils_unittest.cc

Issue 1881001: AU: Many minor cleanup changes (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: fixes for review Created 10 years, 8 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 | « src/platform/update_engine/utils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/update_engine/utils_unittest.cc
diff --git a/src/platform/update_engine/utils_unittest.cc b/src/platform/update_engine/utils_unittest.cc
index 5ab78cd228ea5a64cc54bc2caba0a835ea5bcc3a..a66e739d143d8167e74aeeb1e9c8a40a917caf12 100644
--- a/src/platform/update_engine/utils_unittest.cc
+++ b/src/platform/update_engine/utils_unittest.cc
@@ -125,4 +125,14 @@ TEST(UtilsTest, TempFilenameTest) {
EXPECT_FALSE(utils::StringHasSuffix(result, "XXXXXX"));
}
+TEST(UtilsTest, RootDeviceTest) {
+ EXPECT_EQ("/dev/sda", utils::RootDevice("/dev/sda3"));
+ EXPECT_EQ("/dev/mmc0", utils::RootDevice("/dev/mmc0p3"));
+}
+
+TEST(UtilsTest, PartitionNumberTest) {
+ EXPECT_EQ("3", utils::PartitionNumber("/dev/sda3"));
+ EXPECT_EQ("3", utils::PartitionNumber("/dev/mmc0p3"));
+}
+
} // namespace chromeos_update_engine
« no previous file with comments | « src/platform/update_engine/utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698