mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 02:17:14 +00:00
6594ded7d9
Change-Id: Ifbdf1c33cc359519fdcf2637d50a9e4d3b054af7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204481 Reviewed-by: Samuel Rawlins <srawlins@google.com>
30 lines
972 B
Dart
30 lines
972 B
Dart
// Copyright (c) 2019, 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.
|
|
|
|
import 'package:analyzer/dart/ast/ast.dart';
|
|
import 'package:analyzer/src/generated/source.dart';
|
|
import 'package:analyzer_plugin/protocol/protocol_common.dart';
|
|
import 'package:nnbd_migration/nnbd_migration.dart';
|
|
import 'package:test/test.dart';
|
|
|
|
class TestMigrationListener implements NullabilityMigrationListener {
|
|
final edits = <Source, List<SourceEdit>>{};
|
|
|
|
List<String> details = [];
|
|
|
|
@override
|
|
void addEdit(Source source, SourceEdit edit) {
|
|
(edits[source] ??= []).add(edit);
|
|
}
|
|
|
|
@override
|
|
void addSuggestion(String descriptions, Location location) {}
|
|
|
|
@override
|
|
void reportException(
|
|
Source? source, AstNode? node, Object exception, StackTrace stackTrace) {
|
|
fail('Exception reported: $exception\n$stackTrace');
|
|
}
|
|
}
|