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

Unified Diff: util/misc/uuid_test.cc

Issue 440603002: Put back the standard-layout checks lost in 5bbb7e8abbe0 (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 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 | « util/misc/uuid.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/misc/uuid_test.cc
diff --git a/util/misc/uuid_test.cc b/util/misc/uuid_test.cc
index 9664f7eab133565441104aae2fe419edd28ec63d..2e3bea32344a2dea24c980468987cfb2c62ef6b1 100644
--- a/util/misc/uuid_test.cc
+++ b/util/misc/uuid_test.cc
@@ -99,6 +99,21 @@ TEST(UUID, UUID) {
EXPECT_EQ(0x11u, uuid.data_5[4]);
EXPECT_EQ(0x00u, uuid.data_5[5]);
EXPECT_EQ("ffeeddcc-bbaa-9988-7766-554433221100", uuid.ToString());
+
+ // Test that UUID is standard layout.
+ memset(&uuid, 0x45, 16);
+ EXPECT_EQ(0x45454545u, uuid.data_1);
+ EXPECT_EQ(0x4545u, uuid.data_2);
+ EXPECT_EQ(0x4545u, uuid.data_3);
+ EXPECT_EQ(0x45u, uuid.data_4[0]);
+ EXPECT_EQ(0x45u, uuid.data_4[1]);
+ EXPECT_EQ(0x45u, uuid.data_5[0]);
+ EXPECT_EQ(0x45u, uuid.data_5[1]);
+ EXPECT_EQ(0x45u, uuid.data_5[2]);
+ EXPECT_EQ(0x45u, uuid.data_5[3]);
+ EXPECT_EQ(0x45u, uuid.data_5[4]);
+ EXPECT_EQ(0x45u, uuid.data_5[5]);
+ EXPECT_EQ("45454545-4545-4545-4545-454545454545", uuid.ToString());
}
} // namespace
« no previous file with comments | « util/misc/uuid.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698