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

Side by Side Diff: utils/tests/pub/validator_test.dart

Issue 11737013: Validate that a package doesn't depend on itself. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library validator_test; 5 library validator_test;
6 6
7 import 'dart:io'; 7 import 'dart:io';
8 import 'dart:json'; 8 import 'dart:json';
9 9
10 import 'test_pub.dart'; 10 import 'test_pub.dart';
(...skipping 513 matching lines...) Expand 10 before | Expand all | Expand 10 after
524 ]).scheduleCreate(); 524 ]).scheduleCreate();
525 525
526 expectLater(schedulePackageValidation(dependency), 526 expectLater(schedulePackageValidation(dependency),
527 pairOf(isEmpty, someElement(contains( 527 pairOf(isEmpty, someElement(contains(
528 ' foo: ">=0.1.2 <0.1.3"')))); 528 ' foo: ">=0.1.2 <0.1.3"'))));
529 529
530 run(); 530 run();
531 }); 531 });
532 }); 532 });
533 }); 533 });
534
535 test('has a hosted dependency on itself', () {
536 dir(appPath, [
537 libPubspec("test_pkg", "1.0.0", [
538 {'hosted': 'foo'}
Bob Nystrom 2013/01/03 20:52:45 Shouldn't this be "test_pkg"?
nweiz 2013/01/03 21:08:12 Yes. The fact that this didn't have a version cons
Bob Nystrom 2013/01/03 21:56:17 That makes me wonder if the expect should be more
nweiz 2013/01/03 22:18:22 I'm not a big fan of searching for strings within
539 ])
540 ]).scheduleCreate();
541
542 expectValidationWarning(dependency);
543
544 run();
545 });
534 }); 546 });
535 } 547 }
OLDNEW
« utils/pub/validator/dependency.dart ('K') | « utils/pub/validator/dependency.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698