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

Unified Diff: pkg/analysis_server/test/search/top_level_declarations_test.dart

Issue 2394683006: Switch analysis_server to use 'package:test'. (Closed)
Patch Set: Created 4 years, 2 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/analysis_server/test/search/top_level_declarations_test.dart
diff --git a/pkg/analysis_server/test/search/top_level_declarations_test.dart b/pkg/analysis_server/test/search/top_level_declarations_test.dart
index 8b1829c8e2e7a7af7e115e8e8f1febd268c75241..17d18828851dd675626f6dd44d2fa8e1faec7e20 100644
--- a/pkg/analysis_server/test/search/top_level_declarations_test.dart
+++ b/pkg/analysis_server/test/search/top_level_declarations_test.dart
@@ -7,15 +7,17 @@ library test.search.top_level_declarations;
import 'dart:async';
import 'package:analysis_server/plugin/protocol/protocol.dart';
+import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
-import 'package:unittest/unittest.dart';
import '../utils.dart';
import 'abstract_search_domain.dart';
main() {
initializeTestEnvironment();
- defineReflectiveTests(TopLevelDeclarationsTest);
+ defineReflectiveSuite(() {
+ defineReflectiveTests(TopLevelDeclarationsTest);
+ });
}
@reflectiveTest
@@ -57,6 +59,11 @@ class TopLevelDeclarationsTest extends AbstractSearchDomainTest {
return null;
}
+ test_invalidRegex() async {
+ var result = await findTopLevelDeclarations('[A');
+ expect(result, new isInstanceOf<RequestError>());
+ }
+
test_startEndPattern() async {
addTestFile('''
class A {} // A
@@ -74,9 +81,4 @@ class ABC {}
assertHasDeclaration(ElementKind.TOP_LEVEL_VARIABLE, 'E');
assertNoDeclaration(ElementKind.CLASS, 'ABC');
}
-
- test_invalidRegex() async {
- var result = await findTopLevelDeclarations('[A');
- expect(result, new isInstanceOf<RequestError>());
- }
}

Powered by Google App Engine
This is Rietveld 408576698