File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
RubberduckTests/Inspections Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -789,6 +789,27 @@ End Function
789
789
Assert . AreEqual ( expected , results . Count ( ) ) ;
790
790
}
791
791
792
+ [ Test ]
793
+ public void ResumeStmt_SingleResult ( )
794
+ {
795
+ string code =
796
+ $@ "
797
+ Public Function Inverse(value As Double) As Double
798
+ On Error GoTo ErrorHandler:
799
+ Dim ratio As Double
800
+ ratio = 0# '<== unused
801
+ ratio = 1# / value '<== used
802
+ Inverse = ratio
803
+ Exit Function
804
+ ErrorHandler:
805
+ ratio = 0# '<== possibly used
806
+ Resume
807
+ End Function
808
+ " ;
809
+ var results = InspectionResultsForStandardModule ( code ) ;
810
+ Assert . AreEqual ( 1 , results . Count ( ) ) ;
811
+ }
812
+
792
813
protected override IInspection InspectionUnderTest ( RubberduckParserState state )
793
814
{
794
815
return new AssignmentNotUsedInspection ( state , new Walker ( ) ) ;
You can’t perform that action at this time.
0 commit comments