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

Unified Diff: test/initializer_from_test.dart

Issue 1008533003: add from option to run (Closed) Base URL: git@github.com:dart-lang/static-init.git@master
Patch Set: code review updates, remove dartium support Created 5 years, 9 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
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/initializer_from_test.dart
diff --git a/test/initializer_from_test.dart b/test/initializer_from_test.dart
new file mode 100644
index 0000000000000000000000000000000000000000..30587f552a5a04c3148b3163790e42da0c2f37b6
--- /dev/null
+++ b/test/initializer_from_test.dart
@@ -0,0 +1,31 @@
+// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+@initializeTracker
+library initialize.test.initializer_from_test;
+
+import 'package:initialize/src/initialize_tracker.dart';
+import 'package:initialize/initialize.dart';
+import 'package:unittest/unittest.dart';
+import 'package:unittest/compact_vm_config.dart';
+import 'package:test_package/bar.dart'; // Used for annotations
+
+main() {
+ useCompactVMConfiguration();
+
+ test('The `from` option', () {
+ var expectedNames = [];
+ return run(from: Uri.parse('package:test_package/bar.dart')).then((_) {
+ // First just run on the test packages bar.dart file.
+ expectedNames.add(const LibraryIdentifier(
+ #test_package.bar, 'test_package', 'bar.dart'));
+ expect(InitializeTracker.seen, expectedNames);
+ }).then((_) => run()).then((_) {
+ // Now we run on the rest (just this file).
+ expectedNames.add(const LibraryIdentifier(
+ #initialize.test.initializer_from_test, null,
+ 'initializer_from_test.dart'));
+ expect(InitializeTracker.seen, expectedNames);
+ });
+ });
+}
« no previous file with comments | « pubspec.yaml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698