Index: base/metrics/field_trial_params_unittest.nc |
diff --git a/base/metrics/field_trial_params_unittest.nc b/base/metrics/field_trial_params_unittest.nc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..3d280fd35817acc0af173d5d79ce82f86ac4c7cf |
--- /dev/null |
+++ b/base/metrics/field_trial_params_unittest.nc |
@@ -0,0 +1,40 @@ |
+// Copyright 2017 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+// This is a "No Compile Test" suite. |
+// http://dev.chromium.org/developers/testing/no-compile-tests |
+ |
+#include "base/metrics/field_trial_params.h" |
+ |
+constexpr base::Feature kFeature{"NoCompileFeature"}; |
+ |
+enum Param { FOO, BAR }; |
+ |
+#if defined(NCTEST_NO_PARAM_TYPE) |
+ |
+constexpr base::FieldParam<> kParam{ // ["need error string"] |
+ &kFeature, "Param"}; |
+ |
+#elif defined(NCTEST_VOID_PARAM_TYPE) |
+ |
+constexpr base::FieldParam<> kParam{ // ["need error string"] |
+ &kFeature, "Param"}; |
+ |
+#elif defined(NCTEST_INVALID_PARAM_TYPE) |
+ |
+constexpr base::FieldParam<unsigned> kParam{ // ["need error string"] |
+ &kFeature, "Param", 1u}; |
+ |
+#elif defined(NCTEST_ENUM_NULL_OPTIONS) |
+ |
+constexpr base::FieldParam<Param> kParam{ // ["need error string"] |
+ &kFeature, "Param", FOO, nullptr}; |
+ |
+#elif defined(NCTEST_ENUM_EMPTY_OPTIONS) |
+ |
+constexpr base::FieldParam<Param>::Option[] kParamOptions = {}; |
+constexpr base::FieldParam<Param> kParam{ |
+ &kFeature, "Param", FOO, &kParamOptions}; |
+ |
+#endif |