Skip to content

Commit a6ec8b6

Browse files
committed
C#: Convert tests cs/useless-gethashcode-call to inline tests.
1 parent f30ebf1 commit a6ec8b6

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

csharp/ql/test/query-tests/Useless Code/IntGetHashCode/IntGetHashCode.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ class IntGetHashCode
33
void Test()
44
{
55
// These are all bad:
6-
default(uint).GetHashCode();
7-
default(int).GetHashCode();
8-
default(long).GetHashCode();
9-
default(ulong).GetHashCode();
10-
default(short).GetHashCode();
11-
default(ushort).GetHashCode();
12-
default(byte).GetHashCode();
13-
default(sbyte).GetHashCode();
6+
default(uint).GetHashCode(); // $ Alert
7+
default(int).GetHashCode(); // $ Alert
8+
default(long).GetHashCode(); // $ Alert
9+
default(ulong).GetHashCode(); // $ Alert
10+
default(short).GetHashCode(); // $ Alert
11+
default(ushort).GetHashCode(); // $ Alert
12+
default(byte).GetHashCode(); // $ Alert
13+
default(sbyte).GetHashCode(); // $ Alert
1414

1515
// These are all good:
1616
default(double).GetHashCode();
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Useless code/IntGetHashCode.ql
1+
query: Useless code/IntGetHashCode.ql
2+
postprocess: utils/test/InlineExpectationsTestQuery.ql

0 commit comments

Comments
 (0)