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

Unified Diff: tools/json_schema_compiler/test/idl_basics.idl

Issue 1982193002: Add enum class support to json_schema_compiler (idl files) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nit python style Created 4 years, 7 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
Index: tools/json_schema_compiler/test/idl_basics.idl
diff --git a/tools/json_schema_compiler/test/idl_basics.idl b/tools/json_schema_compiler/test/idl_basics.idl
index bfa49dce7f41e1d46bb5432bb8a9ca8676011108..555e8ebc2b8d4b8bd0733d5a0c9a5da364a24231 100644
--- a/tools/json_schema_compiler/test/idl_basics.idl
+++ b/tools/json_schema_compiler/test/idl_basics.idl
@@ -17,6 +17,21 @@
name2
};
+ [cpp_enum_prefix_override="prefix"] enum EnumWithPrefix {
Devlin 2016/05/17 19:04:10 Do we want to support prefixes for vanilla enums?
tapted 2016/05/18 09:35:54 Ah, it's actually the prefixes for class-enums tha
+ name1,
+ name2
+ };
+
+ [class] enum EnumClass {
+ name1,
+ name2
+ };
+
+ [class,cpp_enum_prefix_override="prefix"] enum EnumClassWithPrefix {
Devlin 2016/05/17 19:04:10 nit: cpp_enum_prefix_override is quite a mouthful.
tapted 2016/05/18 09:35:54 Yup I agree 'class' is a bit terse - went with enu
+ name1,
+ name2
+ };
+
dictionary MyType1 {
// This comment tests "double-quotes".
[legalValues=(1,2)] long x;
@@ -31,6 +46,13 @@
DOMString x;
};
+ dictionary MyType3 {
+ EnumType w;
+ EnumWithPrefix x;
+ EnumClass y;
+ EnumClassWithPrefix z;
+ };
+
dictionary UnionType {
(EnumType or DOMString)? x;
(DOMString or EnumType) y;

Powered by Google App Engine
This is Rietveld 408576698