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

Unified Diff: dart/sdk/lib/_internal/pub/test/version_solver_test.dart

Issue 106993002: Revert "Change SDK/DartEditor versioning scheme to semantic versions." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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 | « dart/sdk/lib/_internal/pub/test/sdk_test.dart ('k') | dart/tools/VERSION » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/sdk/lib/_internal/pub/test/version_solver_test.dart
diff --git a/dart/sdk/lib/_internal/pub/test/version_solver_test.dart b/dart/sdk/lib/_internal/pub/test/version_solver_test.dart
index f77d22cdb197d3f6b83b7506cdb401da358d7759..83551b1e9a8a9b74c70ba37e27671655ccb351ba 100644
--- a/dart/sdk/lib/_internal/pub/test/version_solver_test.dart
+++ b/dart/sdk/lib/_internal/pub/test/version_solver_test.dart
@@ -794,6 +794,12 @@ sdkConstraint() {
'foo': '2.0.0',
'bar': '2.0.0'
}, maxTries: 3);
+
+ testResolve('ignores SDK constraints on bleeding edge', {
+ 'myapp 0.0.0': {'sdk': badVersion }
+ }, result: {
+ 'myapp from root': '0.0.0'
+ }, useBleedingEdgeSdkVersion: true);
}
void prerelease() {
@@ -983,24 +989,27 @@ void override() {
testResolve(String description, Map packages, {
Map lockfile, Map overrides, Map result, FailMatcherBuilder error,
- int maxTries}) {
+ int maxTries, bool useBleedingEdgeSdkVersion}) {
_testResolve(test, description, packages, lockfile: lockfile,
- overrides: overrides, result: result, error: error, maxTries: maxTries);
+ overrides: overrides, result: result, error: error, maxTries: maxTries,
+ useBleedingEdgeSdkVersion: useBleedingEdgeSdkVersion);
}
solo_testResolve(String description, Map packages, {
Map lockfile, Map overrides, Map result, FailMatcherBuilder error,
- int maxTries}) {
+ int maxTries, bool useBleedingEdgeSdkVersion}) {
log.showSolver();
_testResolve(solo_test, description, packages, lockfile: lockfile,
- overrides: overrides, result: result, error: error, maxTries: maxTries);
+ overrides: overrides, result: result, error: error, maxTries: maxTries,
+ useBleedingEdgeSdkVersion: useBleedingEdgeSdkVersion);
}
_testResolve(void testFn(String description, Function body),
String description, Map packages, {
Map lockfile, Map overrides, Map result, FailMatcherBuilder error,
- int maxTries}) {
+ int maxTries, bool useBleedingEdgeSdkVersion}) {
if (maxTries == null) maxTries = 1;
+ if (useBleedingEdgeSdkVersion == null) useBleedingEdgeSdkVersion = false;
testFn(description, () {
var cache = new SystemCache('.');
@@ -1047,6 +1056,12 @@ _testResolve(void testFn(String description, Function body),
});
}
+ // Make a version number like the continuous build's version.
+ var previousVersion = sdk.version;
+ if (useBleedingEdgeSdkVersion) {
+ sdk.version = new Version(0, 1, 2, build: '0_r12345_juser');
+ }
+
// Resolve the versions.
var future = resolveVersions(cache.sources, root, lockFile: realLockFile);
@@ -1057,6 +1072,12 @@ _testResolve(void testFn(String description, Function body),
matcher = error(maxTries);
}
+ future = future.whenComplete(() {
+ if (useBleedingEdgeSdkVersion) {
+ sdk.version = previousVersion;
+ }
+ });
+
expect(future, completion(matcher));
});
}
« no previous file with comments | « dart/sdk/lib/_internal/pub/test/sdk_test.dart ('k') | dart/tools/VERSION » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698