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

Side by Side Diff: tests/lib/mirrors/library_imports_prefixed_show_hide_test.dart

Issue 1562023002: Add test of unittests. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments Created 4 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 test.library_imports; 5 library test.library_imports_prefixed_show_hide;
6 6
7 import 'dart:mirrors'; 7 import 'dart:mirrors';
8 import 'package:expect/expect.dart'; 8 import 'package:expect/expect.dart';
9 import 'stringify.dart'; 9 import 'stringify.dart';
10 10
11 import 'library_imports_prefixed_show_hide.dart'; 11 import 'library_imports_prefixed_show_hide.dart';
12 12
13 test(MirrorSystem mirrors) { 13 test(MirrorSystem mirrors) {
14 LibraryMirror prefixed_show_hide = mirrors.findLibrary(#library_imports_prefix ed_show_hide); 14 LibraryMirror prefixed_show_hide = mirrors.findLibrary(#library_imports_prefix ed_show_hide);
15 LibraryMirror a = mirrors.findLibrary(#library_imports_a); 15 LibraryMirror a = mirrors.findLibrary(#library_imports_a);
16 LibraryMirror b = mirrors.findLibrary(#library_imports_b); 16 LibraryMirror b = mirrors.findLibrary(#library_imports_b);
17 LibraryMirror core = mirrors.findLibrary(#dart.core); 17 LibraryMirror core = mirrors.findLibrary(#dart.core);
18 18
19 Expect.setEquals([a, b, core], 19 Expect.setEquals([a, b, core],
20 prefixed_show_hide.libraryDependencies.map((dep) => dep.targe tLibrary)); 20 prefixed_show_hide.libraryDependencies.map((dep) => dep.targe tLibrary));
21 21
22 Expect.stringEquals( 22 Expect.stringEquals(
23 'import dart.core\n' 23 'import dart.core\n'
24 'import library_imports_a as prefixa\n' 24 'import library_imports_a as prefixa\n'
25 ' show somethingFromA\n' 25 ' show somethingFromA\n'
26 'import library_imports_b as prefixb\n' 26 'import library_imports_b as prefixb\n'
27 ' hide somethingFromB\n', 27 ' hide somethingFromB\n',
28 stringifyDependencies(prefixed_show_hide)); 28 stringifyDependencies(prefixed_show_hide));
29 } 29 }
30 30
31 main() { 31 main() {
32 test(currentMirrorSystem()); 32 test(currentMirrorSystem());
33 } 33 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698