diff --git a/csharp/ql/test/library-tests/operators/Operators6.expected b/csharp/ql/test/library-tests/operators/Operators6.expected new file mode 100644 index 00000000000..f0878a511d9 --- /dev/null +++ b/csharp/ql/test/library-tests/operators/Operators6.expected @@ -0,0 +1,10 @@ +| operators.cs:15:42:15:43 | ++ | operators.cs:66:19:66:23 | call to operator ++ | +| operators.cs:15:42:15:43 | ++ | operators.cs:67:19:67:23 | call to operator ++ | +| operators.cs:54:38:54:39 | checked ++ | operators.cs:100:17:100:19 | call to operator checked ++ | +| operators.cs:54:38:54:39 | checked ++ | operators.cs:101:17:101:19 | call to operator checked ++ | +| operators.cs:55:30:55:31 | ++ | operators.cs:93:13:93:15 | call to operator ++ | +| operators.cs:55:30:55:31 | ++ | operators.cs:94:13:94:15 | call to operator ++ | +| operators.cs:56:38:56:39 | checked -- | operators.cs:102:17:102:19 | call to operator checked -- | +| operators.cs:56:38:56:39 | checked -- | operators.cs:103:17:103:19 | call to operator checked -- | +| operators.cs:57:30:57:31 | -- | operators.cs:95:13:95:15 | call to operator -- | +| operators.cs:57:30:57:31 | -- | operators.cs:96:13:96:15 | call to operator -- | diff --git a/csharp/ql/test/library-tests/operators/Operators6.ql b/csharp/ql/test/library-tests/operators/Operators6.ql new file mode 100644 index 00000000000..0eb578a1134 --- /dev/null +++ b/csharp/ql/test/library-tests/operators/Operators6.ql @@ -0,0 +1,17 @@ +/** + * @name Test for operators + */ + +import csharp + +from Operator op, OperatorCall call +where + op.fromSource() and + ( + op instanceof IncrementOperator or + op instanceof CheckedIncrementOperator or + op instanceof DecrementOperator or + op instanceof CheckedDecrementOperator + ) and + call.getTarget() = op +select op, call