@@ -613,25 +613,43 @@ public async Task FindsPropertyDefinition()
613
613
[ Fact ]
614
614
public async Task FindsReferencesOnProperty ( )
615
615
{
616
- List < SymbolReference > symbols = await GetReferences ( FindsReferencesOnTypeSymbolsData . PropertySourceDetails ) . ConfigureAwait ( true ) ;
617
- SymbolReference symbol = Assert . Single ( symbols ) ;
618
- Assert . Equal ( "SuperClass.SomeProp" , symbol . SymbolName ) ;
619
- Assert . Equal ( SymbolType . Property , symbol . SymbolType ) ;
620
- AssertIsRegion ( symbol . NameRegion , 17 , 10 , 17 , 19 ) ;
621
- AssertIsRegion ( symbol . ScriptRegion , 17 , 5 , 17 , 19 ) ;
622
- // TODO: This should also find $o.SomeProp
616
+ IEnumerable < SymbolReference > symbols = await GetReferences ( FindsReferencesOnTypeSymbolsData . PropertySourceDetails ) . ConfigureAwait ( true ) ;
617
+ Assert . Collection ( symbols ,
618
+ ( i ) =>
619
+ {
620
+ Assert . Equal ( "$SomeProp" , i . SymbolName ) ;
621
+ Assert . Equal ( "[int] $SomeProp" , i . DisplayString ) ;
622
+ Assert . Equal ( SymbolType . Property , i . SymbolType ) ;
623
+ Assert . True ( i . IsDeclaration ) ;
624
+ } ,
625
+ ( i ) =>
626
+ {
627
+ Assert . Equal ( "$SomeProp" , i . SymbolName ) ;
628
+ Assert . Equal ( "(property) SomeProp" , i . DisplayString ) ;
629
+ Assert . Equal ( SymbolType . Property , i . SymbolType ) ;
630
+ Assert . False ( i . IsDeclaration ) ;
631
+ } ) ;
623
632
}
624
633
625
634
[ Fact ]
626
635
public void FindsOccurrencesOnProperty ( )
627
636
{
628
- IReadOnlyList < SymbolReference > symbols = GetOccurrences ( FindsOccurrencesOnTypeSymbolsData . PropertySourceDetails ) ;
629
- SymbolReference symbol = Assert . Single ( symbols ) ;
630
- Assert . Equal ( "SuperClass.SomePropWithDefault" , symbol . SymbolName ) ;
631
- Assert . Equal ( SymbolType . Property , symbol . SymbolType ) ;
632
- AssertIsRegion ( symbol . NameRegion , 15 , 13 , 15 , 33 ) ;
633
- AssertIsRegion ( symbol . ScriptRegion , 15 , 5 , 15 , 61 ) ;
634
- // TODO: This should also find the $this.SomePropWithDefault reference.
637
+ IEnumerable < SymbolReference > symbols = GetOccurrences ( FindsOccurrencesOnTypeSymbolsData . PropertySourceDetails ) ;
638
+ Assert . Collection ( symbols ,
639
+ ( i ) =>
640
+ {
641
+ Assert . Equal ( "$SomePropWithDefault" , i . SymbolName ) ;
642
+ Assert . Equal ( "[string] $SomePropWithDefault" , i . DisplayString ) ;
643
+ Assert . Equal ( SymbolType . Property , i . SymbolType ) ;
644
+ Assert . True ( i . IsDeclaration ) ;
645
+ } ,
646
+ ( i ) =>
647
+ {
648
+ Assert . Equal ( "$SomePropWithDefault" , i . SymbolName ) ;
649
+ Assert . Equal ( "(property) SomePropWithDefault" , i . DisplayString ) ;
650
+ Assert . Equal ( SymbolType . Property , i . SymbolType ) ;
651
+ Assert . False ( i . IsDeclaration ) ;
652
+ } ) ;
635
653
}
636
654
637
655
[ Fact ]
0 commit comments