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

Unified Diff: pkg/analysis_server/test/services/index/store/codec_test.dart

Issue 1347943006: Replace NameElement with IndexableName. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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/analysis_server/test/services/index/store/codec_test.dart
diff --git a/pkg/analysis_server/test/services/index/store/codec_test.dart b/pkg/analysis_server/test/services/index/store/codec_test.dart
index 2d6a068a09556ae7f3de83e04d8c18cb9ae904da..62e86d5bedce6d67c4d4f1d0d8486cf8878748cf 100644
--- a/pkg/analysis_server/test/services/index/store/codec_test.dart
+++ b/pkg/analysis_server/test/services/index/store/codec_test.dart
@@ -252,6 +252,16 @@ class A {
validateDecode(id1, id2, id3, element);
}
+ void test_encode_IndexableName() {
+ IndexableName indexable = new IndexableName('test');
+ int id1 = codec.encode1(indexable);
+ int id2 = codec.encode2(indexable);
+ int id3 = codec.encode3(indexable);
+ expect(id1, -1);
+ expect(id2, isNonNegative);
+ expect(id3, IndexableNameKind.INSTANCE.index);
+ }
+
void test_encode_LibraryElement() {
resolveTestUnit('''
class A {
@@ -286,17 +296,6 @@ class A {
validateDecode(id1, id2, id3, element);
}
- void test_encode_NameElement() {
- Element element = new NameElement('test');
- IndexableObject indexable = new IndexableElement(element);
- int id1 = codec.encode1(indexable);
- int id2 = codec.encode2(indexable);
- int id3 = codec.encode3(indexable);
- expect(id1, -1);
- expect(id2, isNonNegative);
- expect(id3, IndexableElementKind.forElement(element).index);
- }
-
void test_encode_nullLibraryElement() {
resolveTestUnit('''
test() {}

Powered by Google App Engine
This is Rietveld 408576698