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

Unified Diff: pkg/analysis_server/tool/spec/codegen_matchers.dart

Issue 459643002: Improve matchers for enums defined by the analysis server API. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 4 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
« no previous file with comments | « pkg/analysis_server/test/integration/protocol_matchers.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/tool/spec/codegen_matchers.dart
diff --git a/pkg/analysis_server/tool/spec/codegen_matchers.dart b/pkg/analysis_server/tool/spec/codegen_matchers.dart
index 2db268d74869f7fd5ce420eca1929c3647be86a5..15b4f9420a28301d8c96255d6aac7aefc6e41e26 100644
--- a/pkg/analysis_server/tool/spec/codegen_matchers.dart
+++ b/pkg/analysis_server/tool/spec/codegen_matchers.dart
@@ -103,7 +103,7 @@ class CodegenMatchersVisitor extends HierarchicalApiVisitor with CodeGenerator {
@override
visitTypeEnum(TypeEnum typeEnum) {
- writeln('isIn([');
+ writeln('new MatchesEnum(${JSON.encode(context)}, [');
indent(() {
bool commaNeeded = false;
for (TypeEnumValue value in typeEnum.values) {
« no previous file with comments | « pkg/analysis_server/test/integration/protocol_matchers.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698