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

Unified Diff: pkg/analyzer/test/generated/resolver_test.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/resolver_test.dart
diff --git a/pkg/analyzer/test/generated/resolver_test.dart b/pkg/analyzer/test/generated/resolver_test.dart
index 2c3aad974019075bfe7b20ef41f85c0d1a0a1971..006ef078bf455bd807ae4c62f10c29836867fd4b 100644
--- a/pkg/analyzer/test/generated/resolver_test.dart
+++ b/pkg/analyzer/test/generated/resolver_test.dart
@@ -985,24 +985,18 @@ class SubtypeManagerTest {
class TypeOverrideManagerTest extends EngineTestCase {
void test_exitScope_noScopes() {
TypeOverrideManager manager = new TypeOverrideManager();
- try {
+ expect(() {
manager.exitScope();
- fail("Expected IllegalStateException");
- } on IllegalStateException {
- // Expected
- }
+ }, throwsStateError);
}
void test_exitScope_oneScope() {
TypeOverrideManager manager = new TypeOverrideManager();
manager.enterScope();
manager.exitScope();
- try {
+ expect(() {
manager.exitScope();
- fail("Expected IllegalStateException");
- } on IllegalStateException {
- // Expected
- }
+ }, throwsStateError);
}
void test_exitScope_twoScopes() {
@@ -1011,12 +1005,9 @@ class TypeOverrideManagerTest extends EngineTestCase {
manager.exitScope();
manager.enterScope();
manager.exitScope();
- try {
+ expect(() {
manager.exitScope();
- fail("Expected IllegalStateException");
- } on IllegalStateException {
- // Expected
- }
+ }, throwsStateError);
}
void test_getType_enclosedOverride() {

Powered by Google App Engine
This is Rietveld 408576698