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

Side by Side Diff: rlz/lib/machine_id_unittest.cc

Issue 1650843002: Fix new -Wconstant-conversion versions after clang r259271 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | tools/battor_agent/battor_connection_impl_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "rlz/lib/machine_id.h" 5 #include "rlz/lib/machine_id.h"
6 6
7 #include "base/strings/string16.h" 7 #include "base/strings/string16.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "rlz/test/rlz_test_helpers.h" 9 #include "rlz/test/rlz_test_helpers.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 // This test will fail if the behavior of GetMachineId changes. 12 // This test will fail if the behavior of GetMachineId changes.
13 TEST(MachineDealCodeTestMachineId, MachineId) { 13 TEST(MachineDealCodeTestMachineId, MachineId) {
14 base::string16 computer_sid(base::UTF8ToUTF16( 14 base::string16 computer_sid(base::UTF8ToUTF16(
15 "S-1-5-21-2345599882-2448789067-1921365677")); 15 "S-1-5-21-2345599882-2448789067-1921365677"));
16 std::string id; 16 std::string id;
17 rlz_lib::testing::GetMachineIdImpl(computer_sid, 2651229008, &id); 17 rlz_lib::testing::GetMachineIdImpl(computer_sid, -1643738288, &id);
18 EXPECT_STREQ("A341BA986A7E86840688977FCF20C86E253F00919E068B50F8", 18 EXPECT_STREQ("A341BA986A7E86840688977FCF20C86E253F00919E068B50F8",
19 id.c_str()); 19 id.c_str());
20 } 20 }
OLDNEW
« no previous file with comments | « no previous file | tools/battor_agent/battor_connection_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698