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

Unified Diff: pkg/analysis_server/test/services/index/local_index_test.dart

Issue 969113002: Reformat (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 10 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/index/local_index_test.dart
diff --git a/pkg/analysis_server/test/services/index/local_index_test.dart b/pkg/analysis_server/test/services/index/local_index_test.dart
index d979374a85071a8b89ecfee7230511d699d65848..52c7b2b754f875dd7f46df84e13d38b736966be0 100644
--- a/pkg/analysis_server/test/services/index/local_index_test.dart
+++ b/pkg/analysis_server/test/services/index/local_index_test.dart
@@ -16,23 +16,19 @@ import '../../abstract_context.dart';
import '../../reflective_tests.dart';
import 'store/single_source_container.dart';
-
main() {
groupSep = ' | ';
runReflectiveTests(LocalIndexTest);
}
-
void _assertElementNames(List<Element> elements, List expected) {
expect(_toElementNames(elements), unorderedEquals(expected));
}
-
Iterable<String> _toElementNames(List<Element> elements) {
return elements.map((element) => element.name);
}
-
@reflectiveTest
class LocalIndexTest extends AbstractContextTest {
LocalIndex index;
@@ -50,7 +46,7 @@ class LocalIndexTest extends AbstractContextTest {
void test_clear() {
_indexTest('main() {}');
_assertElementNames(_getTopElements(), ['main']);
- // clear
+ // clear
index.clear();
expect(_getTopElements(), isEmpty);
}
@@ -90,7 +86,7 @@ class LocalIndexTest extends AbstractContextTest {
void test_removeSource() {
Source sourceA = _indexLibraryUnit('/testA.dart', 'fa() {}');
_indexLibraryUnit('/testB.dart', 'fb() {}');
- // OK, there are 2 functions
+ // OK, there are 2 functions
_assertElementNames(_getTopElements(), ['fa', 'fb']);
// remove source
index.removeSource(context, sourceA);
@@ -102,7 +98,7 @@ class LocalIndexTest extends AbstractContextTest {
_indexLibraryUnit('/testB.dart', 'fb() {}');
// OK, there are 2 functions
_assertElementNames(_getTopElements(), ['fa', 'fb']);
- // remove source(s)
+ // remove source(s)
index.removeSources(context, new SingleSourceContainer(sourceA));
_assertElementNames(_getTopElements(), ['fb']);
}

Powered by Google App Engine
This is Rietveld 408576698