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

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

Issue 886773004: Supported versioned patching. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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: tests/compiler/dart2js/mock_compiler.dart
diff --git a/tests/compiler/dart2js/mock_compiler.dart b/tests/compiler/dart2js/mock_compiler.dart
index 0c6fa8eb456a4392ddcf7d6569be573ed21b6b86..2414c4b70f22032b34ac882f1eccdda0b2f01bb3 100644
--- a/tests/compiler/dart2js/mock_compiler.dart
+++ b/tests/compiler/dart2js/mock_compiler.dart
@@ -57,6 +57,7 @@ class MockCompiler extends Compiler {
final int expectedErrors;
final Map<String, SourceFile> sourceFiles;
Node parsedTree;
+ final String testedPatchVersion;
MockCompiler.internal(
{Map<String, String> coreSource,
@@ -76,8 +77,10 @@ class MockCompiler extends Compiler {
bool enableEnums: false,
int this.expectedWarnings,
int this.expectedErrors,
- api.CompilerOutputProvider outputProvider})
+ api.CompilerOutputProvider outputProvider,
+ String patchVersion})
: sourceFiles = new Map<String, SourceFile>(),
+ testedPatchVersion = patchVersion,
super(enableTypeAssertions: enableTypeAssertions,
enableMinification: enableMinification,
enableConcreteTypeInference: enableConcreteTypeInference,
@@ -115,6 +118,10 @@ class MockCompiler extends Compiler {
buildLibrarySource(DEFAULT_ASYNC_LIBRARY));
}
+ String get patchVersion {
+ return testedPatchVersion != null ? testedPatchVersion : super.patchVersion;
+ }
+
/// Initialize the mock compiler with an empty main library.
Future<Uri> init([String mainSource = ""]) {
Uri uri = new Uri(scheme: "mock");

Powered by Google App Engine
This is Rietveld 408576698