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

Side by Side Diff: test/validator/name_test.dart

Issue 1215833002: Use the new test runner. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years, 5 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 import 'package:path/path.dart' as path; 5 import 'package:path/path.dart' as path;
6 import 'package:pub/src/entrypoint.dart'; 6 import 'package:pub/src/entrypoint.dart';
7 import 'package:pub/src/io.dart'; 7 import 'package:pub/src/io.dart';
8 import 'package:pub/src/validator.dart'; 8 import 'package:pub/src/validator.dart';
9 import 'package:pub/src/validator/name.dart'; 9 import 'package:pub/src/validator/name.dart';
10 import 'package:scheduled_test/scheduled_test.dart'; 10 import 'package:scheduled_test/scheduled_test.dart';
11 11
12 import '../descriptor.dart' as d; 12 import '../descriptor.dart' as d;
13 import '../test_pub.dart'; 13 import '../test_pub.dart';
14 import 'utils.dart'; 14 import 'utils.dart';
15 15
16 Validator name(Entrypoint entrypoint) => new NameValidator(entrypoint); 16 Validator name(Entrypoint entrypoint) => new NameValidator(entrypoint);
17 17
18 main() { 18 main() {
19 initConfig();
20
21 group('should consider a package valid if it', () { 19 group('should consider a package valid if it', () {
22 setUp(d.validPackage.create); 20 setUp(d.validPackage.create);
23 21
24 integration('looks normal', () => expectNoValidationError(name)); 22 integration('looks normal', () => expectNoValidationError(name));
25 23
26 integration('has a badly-named library in lib/src', () { 24 integration('has a badly-named library in lib/src', () {
27 d.dir(appPath, [ 25 d.dir(appPath, [
28 d.libPubspec("test_pkg", "1.0.0"), 26 d.libPubspec("test_pkg", "1.0.0"),
29 d.dir("lib", [ 27 d.dir("lib", [
30 d.file("test_pkg.dart", "int i = 1;"), 28 d.file("test_pkg.dart", "int i = 1;"),
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 integration('has a single library named differently than the package', () { 106 integration('has a single library named differently than the package', () {
109 schedule(() => 107 schedule(() =>
110 deleteEntry(path.join(sandboxDir, appPath, "lib", "test_pkg.dart"))); 108 deleteEntry(path.join(sandboxDir, appPath, "lib", "test_pkg.dart")));
111 d.dir(appPath, [ 109 d.dir(appPath, [
112 d.dir("lib", [d.file("best_pkg.dart", "int i = 0;")]) 110 d.dir("lib", [d.file("best_pkg.dart", "int i = 0;")])
113 ]).create(); 111 ]).create();
114 expectValidationWarning(name); 112 expectValidationWarning(name);
115 }); 113 });
116 }); 114 });
117 } 115 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698