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

Unified Diff: pkg/analyzer/test/generated/test_support.dart

Issue 2326813002: Replace and remove JavaException(s). (Closed)
Patch Set: Created 4 years, 3 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/generated/test_support.dart
diff --git a/pkg/analyzer/test/generated/test_support.dart b/pkg/analyzer/test/generated/test_support.dart
index eef623fc20a632017987dcd15615cbe509cbed96..c11383893c47c753af882cce0df6e23248407aee 100644
--- a/pkg/analyzer/test/generated/test_support.dart
+++ b/pkg/analyzer/test/generated/test_support.dart
@@ -12,7 +12,6 @@ import 'package:analyzer/dart/element/type.dart';
import 'package:analyzer/src/dart/ast/utilities.dart';
import 'package:analyzer/src/generated/engine.dart';
import 'package:analyzer/src/generated/error.dart';
-import 'package:analyzer/src/generated/java_core.dart';
import 'package:analyzer/src/generated/java_engine.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:plugin/manager.dart';
@@ -129,7 +128,7 @@ class EngineTestCase {
AstNode root, String code, String prefix, Predicate<AstNode> predicate) {
int offset = code.indexOf(prefix);
if (offset == -1) {
- throw new IllegalArgumentException("Not found '$prefix'.");
+ throw new ArgumentError("Not found '$prefix'.");
}
AstNode node = new NodeLocator(offset).searchWithin(root);
return node.getAncestor(predicate);
@@ -142,7 +141,7 @@ class EngineTestCase {
AstNode root, String code, String prefix) {
int offset = code.indexOf(prefix);
if (offset == -1) {
- throw new IllegalArgumentException("Not found '$prefix'.");
+ throw new ArgumentError("Not found '$prefix'.");
}
return new NodeLocator(offset).searchWithin(root);
}
@@ -589,7 +588,7 @@ class TestSource extends Source {
Uri get uri => new Uri.file(_name);
UriKind get uriKind {
- throw new UnsupportedOperationException();
+ throw new UnsupportedError('uriKind');
}
bool operator ==(Object other) {
@@ -601,11 +600,11 @@ class TestSource extends Source {
bool exists() => exists2;
void getContentsToReceiver(Source_ContentReceiver receiver) {
- throw new UnsupportedOperationException();
+ throw new UnsupportedError('getContentsToReceiver');
}
Source resolve(String uri) {
- throw new UnsupportedOperationException();
+ throw new UnsupportedError('resolve');
}
void setContents(String value) {

Powered by Google App Engine
This is Rietveld 408576698