Skip to content

Commit c73d6da

Browse files
committed
C#: Add an increment/decrement operator test case.
1 parent af37d5a commit c73d6da

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
| operators.cs:15:42:15:43 | ++ | operators.cs:66:19:66:23 | call to operator ++ |
2+
| operators.cs:15:42:15:43 | ++ | operators.cs:67:19:67:23 | call to operator ++ |
3+
| operators.cs:54:38:54:39 | checked ++ | operators.cs:100:17:100:19 | call to operator checked ++ |
4+
| operators.cs:54:38:54:39 | checked ++ | operators.cs:101:17:101:19 | call to operator checked ++ |
5+
| operators.cs:55:30:55:31 | ++ | operators.cs:93:13:93:15 | call to operator ++ |
6+
| operators.cs:55:30:55:31 | ++ | operators.cs:94:13:94:15 | call to operator ++ |
7+
| operators.cs:56:38:56:39 | checked -- | operators.cs:102:17:102:19 | call to operator checked -- |
8+
| operators.cs:56:38:56:39 | checked -- | operators.cs:103:17:103:19 | call to operator checked -- |
9+
| operators.cs:57:30:57:31 | -- | operators.cs:95:13:95:15 | call to operator -- |
10+
| operators.cs:57:30:57:31 | -- | operators.cs:96:13:96:15 | call to operator -- |
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* @name Test for operators
3+
*/
4+
5+
import csharp
6+
7+
from Operator op, OperatorCall call
8+
where
9+
op.fromSource() and
10+
(
11+
op instanceof IncrementOperator or
12+
op instanceof CheckedIncrementOperator or
13+
op instanceof DecrementOperator or
14+
op instanceof CheckedDecrementOperator
15+
) and
16+
call.getTarget() = op
17+
select op, call

0 commit comments

Comments
 (0)