OLD | NEW |
1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 The Crashpad Authors. All rights reserved. |
2 // | 2 // |
3 // Licensed under the Apache License, Version 2.0 (the "License"); | 3 // Licensed under the Apache License, Version 2.0 (the "License"); |
4 // you may not use this file except in compliance with the License. | 4 // you may not use this file except in compliance with the License. |
5 // You may obtain a copy of the License at | 5 // You may obtain a copy of the License at |
6 // | 6 // |
7 // http://www.apache.org/licenses/LICENSE-2.0 | 7 // http://www.apache.org/licenses/LICENSE-2.0 |
8 // | 8 // |
9 // Unless required by applicable law or agreed to in writing, software | 9 // Unless required by applicable law or agreed to in writing, software |
10 // distributed under the License is distributed on an "AS IS" BASIS, | 10 // distributed under the License is distributed on an "AS IS" BASIS, |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 EXPECT_EQ(0x9988u, uuid.data_3); | 92 EXPECT_EQ(0x9988u, uuid.data_3); |
93 EXPECT_EQ(0x77u, uuid.data_4[0]); | 93 EXPECT_EQ(0x77u, uuid.data_4[0]); |
94 EXPECT_EQ(0x66u, uuid.data_4[1]); | 94 EXPECT_EQ(0x66u, uuid.data_4[1]); |
95 EXPECT_EQ(0x55u, uuid.data_5[0]); | 95 EXPECT_EQ(0x55u, uuid.data_5[0]); |
96 EXPECT_EQ(0x44u, uuid.data_5[1]); | 96 EXPECT_EQ(0x44u, uuid.data_5[1]); |
97 EXPECT_EQ(0x33u, uuid.data_5[2]); | 97 EXPECT_EQ(0x33u, uuid.data_5[2]); |
98 EXPECT_EQ(0x22u, uuid.data_5[3]); | 98 EXPECT_EQ(0x22u, uuid.data_5[3]); |
99 EXPECT_EQ(0x11u, uuid.data_5[4]); | 99 EXPECT_EQ(0x11u, uuid.data_5[4]); |
100 EXPECT_EQ(0x00u, uuid.data_5[5]); | 100 EXPECT_EQ(0x00u, uuid.data_5[5]); |
101 EXPECT_EQ("ffeeddcc-bbaa-9988-7766-554433221100", uuid.ToString()); | 101 EXPECT_EQ("ffeeddcc-bbaa-9988-7766-554433221100", uuid.ToString()); |
| 102 |
| 103 // Test that UUID is standard layout. |
| 104 memset(&uuid, 0x45, 16); |
| 105 EXPECT_EQ(0x45454545u, uuid.data_1); |
| 106 EXPECT_EQ(0x4545u, uuid.data_2); |
| 107 EXPECT_EQ(0x4545u, uuid.data_3); |
| 108 EXPECT_EQ(0x45u, uuid.data_4[0]); |
| 109 EXPECT_EQ(0x45u, uuid.data_4[1]); |
| 110 EXPECT_EQ(0x45u, uuid.data_5[0]); |
| 111 EXPECT_EQ(0x45u, uuid.data_5[1]); |
| 112 EXPECT_EQ(0x45u, uuid.data_5[2]); |
| 113 EXPECT_EQ(0x45u, uuid.data_5[3]); |
| 114 EXPECT_EQ(0x45u, uuid.data_5[4]); |
| 115 EXPECT_EQ(0x45u, uuid.data_5[5]); |
| 116 EXPECT_EQ("45454545-4545-4545-4545-454545454545", uuid.ToString()); |
102 } | 117 } |
103 | 118 |
104 } // namespace | 119 } // namespace |
OLD | NEW |