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

Unified Diff: pkg/analysis_server/test/services/completion/dart/uri_contributor_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/services/completion/dart/uri_contributor_test.dart
diff --git a/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
index 99cfd293109fadb250e4954a850b9347635043e3..61637d9e2713634c3f7829c0f290db84857e01e0 100644
--- a/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
+++ b/pkg/analysis_server/test/services/completion/dart/uri_contributor_test.dart
@@ -9,16 +9,18 @@ import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
import 'package:analysis_server/src/services/completion/dart/uri_contributor.dart';
import 'package:analyzer/file_system/memory_file_system.dart';
import 'package:path/path.dart';
+import 'package:test/test.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
-import 'package:unittest/unittest.dart';
import '../../../utils.dart';
import 'completion_contributor_util.dart';
main() {
initializeTestEnvironment();
- defineReflectiveTests(UriContributorTest);
- defineReflectiveTests(UriContributorWindowsTest);
+ defineReflectiveSuite(() {
+ defineReflectiveTests(UriContributorTest);
+ defineReflectiveTests(UriContributorWindowsTest);
+ });
}
@reflectiveTest
@@ -267,26 +269,26 @@ class UriContributorTest extends DartCompletionContributorTest {
csKind: CompletionSuggestionKind.IMPORT);
}
- test_import_package2_with_trailing() async {
+ test_import_package2_raw() async {
addPackageSource('foo', 'foo.dart', 'library foo;');
addPackageSource('foo', 'baz/too.dart', 'library too;');
addPackageSource('bar', 'bar.dart', 'library bar;');
- addTestSource('import "package:foo/baz/^.dart" import');
+ addTestSource('import r"package:foo/baz/^" import');
await computeSuggestions();
assertSuggest('package:foo/baz/too.dart',
csKind: CompletionSuggestionKind.IMPORT);
- expect(replacementOffset, completionOffset - 16);
- expect(replacementLength, 5 + 16);
}
- test_import_package2_raw() async {
+ test_import_package2_with_trailing() async {
addPackageSource('foo', 'foo.dart', 'library foo;');
addPackageSource('foo', 'baz/too.dart', 'library too;');
addPackageSource('bar', 'bar.dart', 'library bar;');
- addTestSource('import r"package:foo/baz/^" import');
+ addTestSource('import "package:foo/baz/^.dart" import');
await computeSuggestions();
assertSuggest('package:foo/baz/too.dart',
csKind: CompletionSuggestionKind.IMPORT);
+ expect(replacementOffset, completionOffset - 16);
+ expect(replacementLength, 5 + 16);
}
test_import_package_missing_lib() async {

Powered by Google App Engine
This is Rietveld 408576698