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

Unified Diff: base/metrics/field_trial_unittest.cc

Issue 596103002: Fix more disabled MSVC warnings, base/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comment Created 6 years, 3 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 | « base/logging_win.cc ('k') | base/metrics/histogram.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/field_trial_unittest.cc
diff --git a/base/metrics/field_trial_unittest.cc b/base/metrics/field_trial_unittest.cc
index a6dee1132c5b65bf914685dc0c9be39d14037eed..52ce8554db06e98ff1ba88b98d8994072e491c80 100644
--- a/base/metrics/field_trial_unittest.cc
+++ b/base/metrics/field_trial_unittest.cc
@@ -114,10 +114,11 @@ TEST_F(FieldTrialTest, AbsoluteProbabilities) {
char default_always_false[] = " default always false";
for (int i = 1; i < 250; ++i) {
// Try lots of names, by changing the first character of the name.
- always_true[0] = i;
- default_always_true[0] = i;
- always_false[0] = i;
- default_always_false[0] = i;
+ char c = static_cast<char>(i);
+ always_true[0] = c;
+ default_always_true[0] = c;
+ always_false[0] = c;
+ default_always_false[0] = c;
scoped_refptr<FieldTrial> trial_true =
CreateFieldTrial(always_true, 10, default_always_true, NULL);
@@ -190,8 +191,9 @@ TEST_F(FieldTrialTest, MiddleProbabilities) {
bool false_event_seen = false;
bool true_event_seen = false;
for (int i = 1; i < 250; ++i) {
- name[0] = i;
- default_group_name[0] = i;
+ char c = static_cast<char>(i);
+ name[0] = c;
+ default_group_name[0] = c;
scoped_refptr<FieldTrial> trial =
CreateFieldTrial(name, 10, default_group_name, NULL);
int might_win = trial->AppendGroup("MightWin", 5);
« no previous file with comments | « base/logging_win.cc ('k') | base/metrics/histogram.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698