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

Side by Side Diff: test/initializer_custom_filter_test.dart

Issue 880713002: add LibraryIdentifier (Closed) Base URL: git@github.com:dart-lang/static-init.git@master
Patch Set: code review updates Created 5 years, 10 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
« no previous file with comments | « test/initialize_tracker.dart ('k') | test/initializer_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 library initialize.initializer_custom_filter_test; 4 library initialize.initializer_custom_filter_test;
5 5
6 import 'dart:async'; 6 import 'dart:async';
7 import 'package:initialize/initialize.dart'; 7 import 'package:initialize/initialize.dart';
8 import 'package:unittest/unittest.dart'; 8 import 'package:unittest/unittest.dart';
9 import 'package:unittest/compact_vm_config.dart'; 9 import 'package:unittest/compact_vm_config.dart';
10 import 'initialize_tracker.dart'; 10 import 'package:initialize/src/initialize_tracker.dart';
11 11
12 main() { 12 main() {
13 useCompactVMConfiguration(); 13 useCompactVMConfiguration();
14 14
15 test('filter option limits which types of annotations will be ran', () { 15 test('filter option limits which types of annotations will be ran', () {
16 var originalSize; 16 var originalSize;
17 return runPhase(1).then((_) { 17 return runPhase(1).then((_) {
18 // Even though Baz extends Bar, only Baz should be run. 18 // Even though Baz extends Bar, only Baz should be run.
19 expect(InitializeTracker.seen, [Baz]); 19 expect(InitializeTracker.seen, [Baz]);
20 }).then((_) => runPhase(2)).then((_) { 20 }).then((_) => runPhase(2)).then((_) {
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 @PhasedInitializer(1) 53 @PhasedInitializer(1)
54 class Baz extends Bar {} 54 class Baz extends Bar {}
55 55
56 // Initializer that has a phase associated with it, this can be used in 56 // Initializer that has a phase associated with it, this can be used in
57 // combination with a custom filter to run intialization in phases. 57 // combination with a custom filter to run intialization in phases.
58 class PhasedInitializer extends InitializeTracker { 58 class PhasedInitializer extends InitializeTracker {
59 final int phase; 59 final int phase;
60 60
61 const PhasedInitializer(this.phase); 61 const PhasedInitializer(this.phase);
62 } 62 }
OLDNEW
« no previous file with comments | « test/initialize_tracker.dart ('k') | test/initializer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698