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

Unified Diff: pkg/analyzer/test/src/task/strong/strong_test_helper.dart

Issue 1632113002: make checker_test, inferred_type_test easier to debug (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analyzer/test/src/task/strong/strong_test_helper.dart
diff --git a/pkg/analyzer/test/src/task/strong/strong_test_helper.dart b/pkg/analyzer/test/src/task/strong/strong_test_helper.dart
index f386377d44db4e985e227a86622e95901db2ce4d..d18b4936b372d4ea8e57b6c852eda7545bdbb66a 100644
--- a/pkg/analyzer/test/src/task/strong/strong_test_helper.dart
+++ b/pkg/analyzer/test/src/task/strong/strong_test_helper.dart
@@ -203,7 +203,7 @@ List<LibraryElement> reachableLibraries(LibraryElement start) {
/// For example, to check that an assignment produces a warning about a boxing
/// conversion, you can describe the test as follows:
///
-/// testChecker({
+/// testChecker('test feature', () => {
/// '/main.dart': '''
/// testMethod() {
/// dynamic x = /*warning:Box*/3;
@@ -211,9 +211,11 @@ List<LibraryElement> reachableLibraries(LibraryElement start) {
/// '''
/// });
///
-void testChecker(String name, Map<String, String> testFiles) {
+void testChecker(String name, Map<String, String> getTestFiles()) {
test(name, () {
AnalysisEngine.instance.processRequiredPlugins();
+
+ var testFiles = getTestFiles();
expect(testFiles.containsKey('/main.dart'), isTrue,
reason: '`/main.dart` is missing in testFiles');

Powered by Google App Engine
This is Rietveld 408576698