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

Unified Diff: tests/compiler/dart2js/analyze_only_test.dart

Issue 1248483008: Split MessageKind into a MessageKind key and a MessageTemplate. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/warnings.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/analyze_only_test.dart
diff --git a/tests/compiler/dart2js/analyze_only_test.dart b/tests/compiler/dart2js/analyze_only_test.dart
index 785d3f81c9ba47527300178f08ccb80d1584ad00..ff2808544b9b7ca5a89d39d5e987c5ce7aef9348 100644
--- a/tests/compiler/dart2js/analyze_only_test.dart
+++ b/tests/compiler/dart2js/analyze_only_test.dart
@@ -12,8 +12,8 @@ import "package:async_helper/async_helper.dart";
import '../../utils/dummy_compiler_test.dart' as dummy;
import 'package:compiler/compiler.dart';
-import 'package:compiler/src/dart2jslib.dart' show
- MessageKind;
+import 'package:compiler/src/warnings.dart' show
+ MessageKind, MessageTemplate;
import 'output_collector.dart';
@@ -68,8 +68,10 @@ main() {
(String code, List errors, List warnings) {
Expect.isNotNull(code);
Expect.isTrue(errors.isEmpty, 'errors is not empty: $errors');
+ MessageTemplate template =
+ MessageTemplate.TEMPLATES[MessageKind.MISSING_MAIN];
Expect.equals(
- "${MessageKind.MISSING_MAIN.message({'main': 'main'})}",
+ "${template.message({'main': 'main'})}",
warnings.single);
});
@@ -88,8 +90,10 @@ main() {
(String code, List errors, List warnings) {
Expect.isNull(code);
Expect.isTrue(errors.isEmpty, 'errors is not empty: $errors');
+ MessageTemplate template =
+ MessageTemplate.TEMPLATES[MessageKind.CONSIDER_ANALYZE_ALL];
Expect.equals(
- "${MessageKind.CONSIDER_ANALYZE_ALL.message({'main': 'main'})}",
+ "${template.message({'main': 'main'})}",
warnings.single);
});
@@ -108,8 +112,10 @@ main() {
(String code, List errors, List warnings) {
Expect.isNull(code);
Expect.isTrue(errors.isEmpty, 'errors is not empty: $errors');
+ MessageTemplate template =
+ MessageTemplate.TEMPLATES[MessageKind.CONSIDER_ANALYZE_ALL];
Expect.equals(
- "${MessageKind.CONSIDER_ANALYZE_ALL.message({'main': 'main'})}",
+ "${template.message({'main': 'main'})}",
warnings.single);
});
« no previous file with comments | « pkg/compiler/lib/src/warnings.dart ('k') | tests/compiler/dart2js/compiler_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698