@@ -293,6 +293,15 @@ public void UciUnit_Division(string operands, string expected, string typeName)
293
293
TestBinaryOp ( MathSymbols . DIVIDE , operands , expected , typeName ) ;
294
294
}
295
295
296
+ [ TestCase ( @"9.5_\_2.4" , "5" , "Long" ) ]
297
+ [ TestCase ( @"10_\_4" , "2" , "Long" ) ]
298
+ [ TestCase ( @"5.423_\_1" , "5" , "Long" ) ]
299
+ [ Category ( "Inspections" ) ]
300
+ public void UciUnit_IntegerDivision ( string operands , string expected , string typeName )
301
+ {
302
+ TestBinaryOp ( MathSymbols . INTEGER_DIVIDE , operands , expected , typeName ) ;
303
+ }
304
+
296
305
[ TestCase ( "10.51_+_11.2" , "21.71" , "Double" ) ]
297
306
[ TestCase ( "10_+_11.2" , "21.2" , "Double" ) ]
298
307
[ TestCase ( "11.2_+_10" , "21.2" , "Double" ) ]
@@ -2075,10 +2084,6 @@ End Select
2075
2084
[ Category ( "Inspections" ) ]
2076
2085
public void UciFunctional_IsStmtAndNegativeRangeWithConstants ( )
2077
2086
{
2078
- var test1 = VBAParser . DefaultVocabulary . GetDisplayName ( VBAParser . EQ ) ;
2079
- var test2 = VBAParser . DefaultVocabulary . GetLiteralName ( VBAParser . EQ ) ;
2080
- var test3 = VBAParser . DefaultVocabulary . GetSymbolicName ( VBAParser . EQ ) ;
2081
-
2082
2087
const string inputCode =
2083
2088
@"
2084
2089
private const START As Long = 10
@@ -2188,6 +2193,30 @@ End Select
2188
2193
CheckActualResultsEqualsExpected ( inputCode , unreachable : 1 ) ;
2189
2194
}
2190
2195
2196
+ [ Test ]
2197
+ [ Category ( "Inspections" ) ]
2198
+ public void UciFunctional_IntegerDivision ( )
2199
+ {
2200
+ string inputCode =
2201
+ @"
2202
+ private const START As Long = 3
2203
+ private const FINISH As Long = 10
2204
+
2205
+ Sub Foo(x As Long, y As Long, z As Long)
2206
+ Select Case z
2207
+ Case x
2208
+ 'OK
2209
+ Case START
2210
+ 'OK
2211
+ Case FINISH \ START
2212
+ 'Unreachable
2213
+ End Select
2214
+
2215
+ End Sub" ;
2216
+
2217
+ CheckActualResultsEqualsExpected ( inputCode , unreachable : 1 ) ;
2218
+ }
2219
+
2191
2220
private static void CheckActualResultsEqualsExpected ( string inputCode , int unreachable = 0 , int mismatch = 0 , int caseElse = 0 )
2192
2221
{
2193
2222
var expected = new Dictionary < string , int >
0 commit comments