Index: base/guid_unittest.cc |
diff --git a/chrome/common/guid_unittest.cc b/base/guid_unittest.cc |
similarity index 68% |
rename from chrome/common/guid_unittest.cc |
rename to base/guid_unittest.cc |
index 628bafca7c4764a3923827f4ea60b2e4f0b538fa..18c04a9d3363d42f256d53a8dd9b915e22e5a5dc 100644 |
--- a/chrome/common/guid_unittest.cc |
+++ b/base/guid_unittest.cc |
@@ -1,8 +1,8 @@ |
-// Copyright (c) 2010 The Chromium Authors. All rights reserved. |
+// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#include "chrome/common/guid.h" |
+#include "base/guid.h" |
#include <limits> |
@@ -11,13 +11,13 @@ |
#if defined(OS_POSIX) |
TEST(GUIDTest, GUIDGeneratesAllZeroes) { |
uint64 bytes[] = { 0, 0 }; |
- std::string clientid = guid::RandomDataToGUIDString(bytes); |
+ std::string clientid = base::RandomDataToGUIDString(bytes); |
EXPECT_EQ("00000000-0000-0000-0000-000000000000", clientid); |
} |
TEST(GUIDTest, GUIDGeneratesCorrectly) { |
uint64 bytes[] = { 0x0123456789ABCDEFULL, 0xFEDCBA9876543210ULL }; |
- std::string clientid = guid::RandomDataToGUIDString(bytes); |
+ std::string clientid = base::RandomDataToGUIDString(bytes); |
EXPECT_EQ("01234567-89AB-CDEF-FEDC-BA9876543210", clientid); |
} |
#endif |
@@ -25,16 +25,16 @@ TEST(GUIDTest, GUIDGeneratesCorrectly) { |
TEST(GUIDTest, GUIDCorrectlyFormatted) { |
const int kIterations = 10; |
for (int it = 0; it < kIterations; ++it) { |
- std::string guid = guid::GenerateGUID(); |
- EXPECT_TRUE(guid::IsValidGUID(guid)); |
+ std::string guid = base::GenerateGUID(); |
+ EXPECT_TRUE(base::IsValidGUID(guid)); |
} |
} |
TEST(GUIDTest, GUIDBasicUniqueness) { |
const int kIterations = 10; |
for (int it = 0; it < kIterations; ++it) { |
- std::string guid1 = guid::GenerateGUID(); |
- std::string guid2 = guid::GenerateGUID(); |
+ std::string guid1 = base::GenerateGUID(); |
+ std::string guid2 = base::GenerateGUID(); |
EXPECT_EQ(36U, guid1.length()); |
EXPECT_EQ(36U, guid2.length()); |
EXPECT_NE(guid1, guid2); |