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

Side by Side Diff: base/metrics/histogram_unittest.nc

Issue 2469993002: Assert enum type equivalence in UMA_HISTOGRAM_ENUMERATION (Closed)
Patch Set: add no-compile tests Created 4 years, 1 month 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 // This is a "No Compile Test" suite.
6 // http://dev.chromium.org/developers/testing/no-compile-tests
7
8 #include "base/metrics/histogram_macros.h"
9
10 namespace base {
11
12 #if defined(NCTEST_DIFFERENT_ENUM) // [r"\|sample\| and \|boundary\| shouldn't be of different enums"]
13
14 void WontCompile() {
15 enum TypeA { A };
16 enum TypeB { B };
17 UMA_HISTOGRAM_ENUMERATION("", A, B);
18 }
19
20 #endif
21
22 } // namespace base
OLDNEW
« base/metrics/histogram_macros_internal.h ('K') | « base/metrics/histogram_macros_internal.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698