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

Side by Side Diff: chrome/installer/util/l10n_string_util_unittest.cc

Issue 2794183004: Fix -Wsign-compare in l10n_string_util_unittest.cc (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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 "chrome/installer/util/l10n_string_util.h" 5 #include "chrome/installer/util/l10n_string_util.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "chrome/install_static/install_modes.h" 8 #include "chrome/install_static/install_modes.h"
9 #include "chrome/install_static/test/scoped_install_details.h" 9 #include "chrome/install_static/test/scoped_install_details.h"
10 #include "chrome/installer/util/installer_util_strings.h" 10 #include "chrome/installer/util/installer_util_strings.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 {IDS_APP_SHORTCUTS_SUBDIR_NAME_CANARY_BASE, 58 {IDS_APP_SHORTCUTS_SUBDIR_NAME_CANARY_BASE,
59 IDS_INBOUND_MDNS_RULE_DESCRIPTION_CANARY_BASE, 59 IDS_INBOUND_MDNS_RULE_DESCRIPTION_CANARY_BASE,
60 IDS_INBOUND_MDNS_RULE_NAME_CANARY_BASE, IDS_SXS_SHORTCUT_NAME_BASE}); 60 IDS_INBOUND_MDNS_RULE_NAME_CANARY_BASE, IDS_SXS_SHORTCUT_NAME_BASE});
61 61
62 // Run through all install modes, checking that the mode-specific strings are 62 // Run through all install modes, checking that the mode-specific strings are
63 // mapped properly by GetBaseMessageIdForMode. 63 // mapped properly by GetBaseMessageIdForMode.
64 ASSERT_EQ(install_static::NUM_INSTALL_MODES, mode_to_strings.size()); 64 ASSERT_EQ(install_static::NUM_INSTALL_MODES, mode_to_strings.size());
65 for (int mode_index = 0; mode_index < install_static::NUM_INSTALL_MODES; 65 for (int mode_index = 0; mode_index < install_static::NUM_INSTALL_MODES;
66 ++mode_index) { 66 ++mode_index) {
67 SCOPED_TRACE(testing::Message() << "install mode index: " << mode_index); 67 SCOPED_TRACE(testing::Message() << "install mode index: " << mode_index);
68 ASSERT_EQ(1, mode_to_strings.count(mode_index)); 68 ASSERT_EQ(1U, mode_to_strings.count(mode_index));
69 const auto& mode_strings = mode_to_strings[mode_index]; 69 const auto& mode_strings = mode_to_strings[mode_index];
70 ASSERT_EQ(mode_strings.size(), input_ids.size()); 70 ASSERT_EQ(mode_strings.size(), input_ids.size());
71 71
72 install_static::ScopedInstallDetails install_details(false, mode_index); 72 install_static::ScopedInstallDetails install_details(false, mode_index);
73 for (size_t i = 0; i < input_ids.size(); ++i) 73 for (size_t i = 0; i < input_ids.size(); ++i)
74 EXPECT_EQ(mode_strings[i], GetBaseMessageIdForMode(input_ids[i])); 74 EXPECT_EQ(mode_strings[i], GetBaseMessageIdForMode(input_ids[i]));
75 } 75 }
76 } 76 }
77 #endif // defined(GOOGLE_CHROME_BUILD) 77 #endif // defined(GOOGLE_CHROME_BUILD)
78 78
79 } // namespace installer 79 } // namespace installer
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698