| Index: pkg/analysis_services/test/index/store/codec_test.dart
|
| diff --git a/pkg/analysis_services/test/index/store/codec_test.dart b/pkg/analysis_services/test/index/store/codec_test.dart
|
| index c72cb6054186b34054e8cda7ca13017fcbf52546..6664b90cd7c9dd41fd3693fe6b34a0456335efff 100644
|
| --- a/pkg/analysis_services/test/index/store/codec_test.dart
|
| +++ b/pkg/analysis_services/test/index/store/codec_test.dart
|
| @@ -105,6 +105,30 @@ class A {
|
| }
|
| }
|
|
|
| + void test_encodeHash_notLocal() {
|
| + resolveTestUnit('''
|
| +class A {
|
| + void mainA() {
|
| + int foo; // A
|
| + }
|
| + void mainB() {
|
| + int foo; // B
|
| + int bar;
|
| + }
|
| +}
|
| +''');
|
| + MethodElement mainA = findElement('mainA');
|
| + MethodElement mainB = findElement('mainB');
|
| + Element fooA = mainA.localVariables[0];
|
| + Element fooB = mainB.localVariables[0];
|
| + Element bar = mainB.localVariables[1];
|
| + int id_fooA = codec.encodeHash(fooA);
|
| + int id_fooB = codec.encodeHash(fooB);
|
| + int id_bar = codec.encodeHash(bar);
|
| + expect(id_fooA == id_fooB, isTrue);
|
| + expect(id_fooA == id_bar, isFalse);
|
| + }
|
| +
|
| void test_localLocalVariable() {
|
| resolveTestUnit('''
|
| main() {
|
|
|