C#: Add unsigned right shift operator test case.

This commit is contained in:
Michael Nebel
2023-01-09 15:48:07 +01:00
parent 30738103f0
commit 49a87e152a
3 changed files with 13 additions and 0 deletions

View File

@@ -12,4 +12,9 @@ public class MyClass
var z = -4;
z >>>= 5;
}
}
public class MyOperatorClass
{
public static MyOperatorClass operator >>>(MyOperatorClass a, MyOperatorClass b) { return null; }
}

View File

@@ -4,3 +4,5 @@ binarybitwise
| Operators.cs:13:9:13:16 | ... >>> ... | Operators.cs:13:9:13:9 | access to local variable z | Operators.cs:13:16:13:16 | 5 | >>> | UnsignedRightShiftExpr |
assignbitwise
| Operators.cs:13:9:13:16 | ... >>>= ... | Operators.cs:13:9:13:9 | access to local variable z | Operators.cs:13:16:13:16 | 5 | >>>= | AssignUnsighedRightShiftExpr |
userdefined
| Operators.cs:19:44:19:46 | >>> | op_UnsignedRightShift | UnsignedRightShiftOperator |

View File

@@ -19,3 +19,9 @@ query predicate assignbitwise(
name = op.getOperator() and
qlclass = op.getAPrimaryQlClass()
}
query predicate userdefined(Operator op, string fname, string qlclass) {
op.getFile().getStem() = "Operators" and
fname = op.getFunctionName() and
qlclass = op.getAPrimaryQlClass()
}