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

Side by Side Diff: tests/compiler/dart2js/duplicate_library_test.dart

Issue 1286143003: Move diagnostic_listener.dart and messages.dart to the diagnostics folder (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 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 // Test that duplicate library names result in different messages depending 5 // Test that duplicate library names result in different messages depending
6 // on whether the libraries are based on the same resource. 6 // on whether the libraries are based on the same resource.
7 7
8 import 'dart:async'; 8 import 'dart:async';
9 import 'package:async_helper/async_helper.dart'; 9 import 'package:async_helper/async_helper.dart';
10 import 'package:expect/expect.dart'; 10 import 'package:expect/expect.dart';
11 import 'package:compiler/src/messages.dart' show MessageKind; 11 import 'package:compiler/src/diagnostics/messages.dart' show MessageKind;
12 import 'memory_compiler.dart'; 12 import 'memory_compiler.dart';
13 13
14 void check(String kind, 14 void check(String kind,
15 Iterable<DiagnosticMessage> messages, 15 Iterable<DiagnosticMessage> messages,
16 List<MessageKind> expectedMessageKinds) { 16 List<MessageKind> expectedMessageKinds) {
17 Expect.equals(messages.length, expectedMessageKinds.length, 17 Expect.equals(messages.length, expectedMessageKinds.length,
18 "Unexpected $kind count: $messages"); 18 "Unexpected $kind count: $messages");
19 int i = 0; 19 int i = 0;
20 messages.forEach((DiagnosticMessage message) { 20 messages.forEach((DiagnosticMessage message) {
21 Expect.equals(expectedMessageKinds[i++], message.message.kind); 21 Expect.equals(expectedMessageKinds[i++], message.message.kind);
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 'foo.dart': """ 134 'foo.dart': """
135 library lib; 135 library lib;
136 """, 136 """,
137 'bar.dart': """ 137 'bar.dart': """
138 library lib; 138 library lib;
139 """}, 139 """},
140 warnings: [MessageKind.DUPLICATED_LIBRARY_NAME, 140 warnings: [MessageKind.DUPLICATED_LIBRARY_NAME,
141 MessageKind.DUPLICATED_LIBRARY_NAME]); 141 MessageKind.DUPLICATED_LIBRARY_NAME]);
142 } 142 }
143 143
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/compiler_test.dart ('k') | tests/compiler/dart2js/erroneous_element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698