mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C#: Update tests and test expected output.
This commit is contained in:
@@ -3,16 +3,16 @@ class IntGetHashCode
|
|||||||
void Test()
|
void Test()
|
||||||
{
|
{
|
||||||
// These are all bad:
|
// These are all bad:
|
||||||
default(uint).GetHashCode(); // $ Alert
|
|
||||||
default(int).GetHashCode(); // $ Alert
|
default(int).GetHashCode(); // $ Alert
|
||||||
default(long).GetHashCode(); // $ Alert
|
|
||||||
default(ulong).GetHashCode(); // $ Alert
|
|
||||||
default(short).GetHashCode(); // $ Alert
|
default(short).GetHashCode(); // $ Alert
|
||||||
default(ushort).GetHashCode(); // $ Alert
|
default(ushort).GetHashCode(); // $ Alert
|
||||||
default(byte).GetHashCode(); // $ Alert
|
default(byte).GetHashCode(); // $ Alert
|
||||||
default(sbyte).GetHashCode(); // $ Alert
|
default(sbyte).GetHashCode(); // $ Alert
|
||||||
|
|
||||||
// These are all good:
|
// These are all good:
|
||||||
|
default(uint).GetHashCode();
|
||||||
|
default(long).GetHashCode();
|
||||||
|
default(ulong).GetHashCode();
|
||||||
default(double).GetHashCode();
|
default(double).GetHashCode();
|
||||||
default(float).GetHashCode();
|
default(float).GetHashCode();
|
||||||
default(char).GetHashCode();
|
default(char).GetHashCode();
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
| IntGetHashCode.cs:6:9:6:35 | call to method GetHashCode | Calling GetHashCode() on type uint is redundant. |
|
| IntGetHashCode.cs:6:9:6:34 | call to method GetHashCode | Calling GetHashCode() on type int is redundant. |
|
||||||
| IntGetHashCode.cs:7:9:7:34 | call to method GetHashCode | Calling GetHashCode() on type int is redundant. |
|
| IntGetHashCode.cs:7:9:7:36 | call to method GetHashCode | Calling GetHashCode() on type short is redundant. |
|
||||||
| IntGetHashCode.cs:8:9:8:35 | call to method GetHashCode | Calling GetHashCode() on type long is redundant. |
|
| IntGetHashCode.cs:8:9:8:37 | call to method GetHashCode | Calling GetHashCode() on type ushort is redundant. |
|
||||||
| IntGetHashCode.cs:9:9:9:36 | call to method GetHashCode | Calling GetHashCode() on type ulong is redundant. |
|
| IntGetHashCode.cs:9:9:9:35 | call to method GetHashCode | Calling GetHashCode() on type byte is redundant. |
|
||||||
| IntGetHashCode.cs:10:9:10:36 | call to method GetHashCode | Calling GetHashCode() on type short is redundant. |
|
| IntGetHashCode.cs:10:9:10:36 | call to method GetHashCode | Calling GetHashCode() on type sbyte is redundant. |
|
||||||
| IntGetHashCode.cs:11:9:11:37 | call to method GetHashCode | Calling GetHashCode() on type ushort is redundant. |
|
|
||||||
| IntGetHashCode.cs:12:9:12:35 | call to method GetHashCode | Calling GetHashCode() on type byte is redundant. |
|
|
||||||
| IntGetHashCode.cs:13:9:13:36 | call to method GetHashCode | Calling GetHashCode() on type sbyte is redundant. |
|
|
||||||
|
|||||||
Reference in New Issue
Block a user