Skip to content

Commit 5941b30

Browse files
committed
C#: Convert tests for cs/missed-readonly-modifier to inline expectatations.
1 parent 2952c0d commit 5941b30

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

csharp/ql/test/query-tests/Language Abuse/MissedReadonlyOpportunity/MissedReadonlyOpportunity.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class MissedReadonlyOpportunity<T>
22
{
3-
public int Bad1;
4-
public T Bad2;
3+
public int Bad1; // $ Alert
4+
public T Bad2; // $ Alert
55
public readonly int Good1;
66
public readonly int Good2 = 0;
77
public const int Good3 = 0;
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Language Abuse/MissedReadonlyOpportunity.ql
1+
query: Language Abuse/MissedReadonlyOpportunity.ql
2+
postprocess: utils/test/InlineExpectationsTestQuery.ql

csharp/ql/test/query-tests/Language Abuse/MissedReadonlyOpportunity/MissedReadonlyOpportunityBad.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
class Bad
22
{
3-
int Field;
3+
int Field; // $ Alert
44

55
public Bad(int i)
66
{

0 commit comments

Comments
 (0)