summaryrefslogtreecommitdiff
path: root/buildscripts/idl/tests/test_parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildscripts/idl/tests/test_parser.py')
-rw-r--r--buildscripts/idl/tests/test_parser.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/buildscripts/idl/tests/test_parser.py b/buildscripts/idl/tests/test_parser.py
index d204d88d440..47d84582538 100644
--- a/buildscripts/idl/tests/test_parser.py
+++ b/buildscripts/idl/tests/test_parser.py
@@ -1123,6 +1123,19 @@ class TestParser(testcase.IDLTestcase):
- two
"""), idl.errors.ERROR_ID_IS_NODE_TYPE_SCALAR_OR_MAPPING)
+ def test_feature_flag(self):
+ # type: () -> None
+ """Test feature flag."""
+
+ # Missing default
+ self.assert_parse_fail(
+ textwrap.dedent("""
+ feature_flags:
+ featureFlagToaster:
+ description: "Make toast"
+ cpp_varname: gToaster
+ """), idl.errors.ERROR_ID_MISSING_REQUIRED_FIELD)
+
if __name__ == '__main__':