File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
Rubberduck.Parsing/Symbols Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -12,21 +12,23 @@ namespace Rubberduck.Parsing.Symbols
12
12
public class DebugDeclarations : ICustomDeclarationLoader
13
13
{
14
14
public static Declaration DebugPrint ;
15
- private readonly DeclarationFinder _finder ;
15
+ private readonly RubberduckParserState _state ;
16
16
17
17
public DebugDeclarations ( RubberduckParserState state )
18
18
{
19
- _finder = new DeclarationFinder ( state . AllDeclarations , new CommentNode [ ] { } , new IAnnotation [ ] { } ) ;
19
+ _state = state ;
20
20
}
21
21
22
22
public IReadOnlyList < Declaration > Load ( )
23
23
{
24
- if ( ThereIsAGlobalBuiltInErrVariableDeclaration ( _finder ) )
24
+ var finder = new DeclarationFinder ( _state . AllDeclarations , new CommentNode [ ] { } , new IAnnotation [ ] { } ) ;
25
+
26
+ if ( ThereIsAGlobalBuiltInErrVariableDeclaration ( finder ) )
25
27
{
26
28
return new List < Declaration > ( ) ;
27
29
}
28
30
29
- var vba = _finder . FindProject ( "VBA" ) ;
31
+ var vba = finder . FindProject ( "VBA" ) ;
30
32
if ( vba == null )
31
33
{
32
34
// If the VBA project is null, we haven't loaded any COM references;
Original file line number Diff line number Diff line change @@ -54,8 +54,8 @@ public void shouldUseEachRuleInRulesCollectionToCheckEachReference()
54
54
sut . classifyDeclarations ( qSelection , declaration ) ;
55
55
56
56
//Assert
57
- // 2 rules on 1 referencdes = 2 validation checks
58
- var expectedToVerify = 2 ;
57
+ // 2 rules on 2 references = 4 validation checks
58
+ var expectedToVerify = 4 ;
59
59
emRule . Verify ( emr => emr . setValidFlag ( It . IsAny < IdentifierReference > ( ) , selection ) ,
60
60
Times . Exactly ( expectedToVerify ) ) ;
61
61
You can’t perform that action at this time.
0 commit comments