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

Unified Diff: tests/compiler/dart2js/mock_compiler.dart

Issue 707463003: Support enums in dart2js. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 1 month 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/compiler/lib/src/warnings.dart ('k') | tests/compiler/dart2js/resolver_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/mock_compiler.dart
diff --git a/tests/compiler/dart2js/mock_compiler.dart b/tests/compiler/dart2js/mock_compiler.dart
index cf1549c660e9fb46a8dc199c0544e34c2c2bc33b..94439886ea26320c3a1332c323f740b9644d2ae3 100644
--- a/tests/compiler/dart2js/mock_compiler.dart
+++ b/tests/compiler/dart2js/mock_compiler.dart
@@ -73,6 +73,7 @@ class MockCompiler extends Compiler {
// affected by inlining support.
bool disableInlining: true,
bool trustTypeAnnotations: false,
+ bool enableEnums: false,
int this.expectedWarnings,
int this.expectedErrors})
: sourceFiles = new Map<String, SourceFile>(),
@@ -86,7 +87,8 @@ class MockCompiler extends Compiler {
emitJavaScript: emitJavaScript,
preserveComments: preserveComments,
trustTypeAnnotations: trustTypeAnnotations,
- showPackageWarnings: true) {
+ showPackageWarnings: true,
+ enableEnums: enableEnums) {
this.disableInlining = disableInlining;
deferredLoadTask = new MockDeferredLoadTask(this);
@@ -269,8 +271,10 @@ class MockCompiler extends Compiler {
}
/// Create a new [MockCompiler] and apply it asynchronously to [f].
- static Future create(f(MockCompiler compiler)) {
- MockCompiler compiler = new MockCompiler.internal();
+ static Future create(f(MockCompiler compiler),
+ {bool enableEnums: false}) {
+ MockCompiler compiler = new MockCompiler.internal(
+ enableEnums: enableEnums);
return compiler.init().then((_) => f(compiler));
}
}
« no previous file with comments | « pkg/compiler/lib/src/warnings.dart ('k') | tests/compiler/dart2js/resolver_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698