Index: base/metrics/histogram_unittest.nc |
diff --git a/base/metrics/histogram_unittest.nc b/base/metrics/histogram_unittest.nc |
index 6f913e89f1475ca2dfa3a94317eaea2db9f7a674..ed67854afdeb06ffd0c42f6462eea10311838f5b 100644 |
--- a/base/metrics/histogram_unittest.nc |
+++ b/base/metrics/histogram_unittest.nc |
@@ -5,6 +5,7 @@ |
// This is a "No Compile Test" suite. |
// http://dev.chromium.org/developers/testing/no-compile-tests |
+#include "base/metrics/histogram_functions.h" |
#include "base/metrics/histogram_macros.h" |
namespace base { |
@@ -33,6 +34,34 @@ void WontCompile() { |
UMA_HISTOGRAM_ENUMERATION("", TypeA::A, TypeA::A); |
} |
+#elif defined(NCTEST_FUNCTION_INT) // [r"Non enum passed to UmaHistogramEnumeration"] |
+ |
+void WontCompile() { |
+ UmaHistogramEnumeration("", 1, 2); |
+} |
+ |
+#elif defined(NCTEST_FUNCTION_DIFFERENT_ENUM) // [r"no matching function for call to 'UmaHistogramEnumeration'"] |
+ |
+void WontCompile() { |
+ enum TypeA { A }; |
+ enum TypeB { B }; |
+ UmaHistogramEnumeration("", A, B); |
+} |
+ |
+#elif defined(NCTEST_FUNCTION_FIRST_NOT_ENUM) // [r"no matching function for call to 'UmaHistogramEnumeration'"] |
+ |
+void WontCompile() { |
+ enum TypeB { B }; |
+ UmaHistogramEnumeration("", 1, B); |
+} |
+ |
+#elif defined(NCTEST_FUNCTION_SECOND_NOT_ENUM) // [r"no matching function for call to 'UmaHistogramEnumeration'"] |
+ |
+void WontCompile() { |
+ enum TypeA { A }; |
+ UmaHistogramEnumeration("", A, 2); |
+} |
+ |
#endif |
} // namespace base |