Skip to content

Commit d7dc73e

Browse files
committed
C#: Remove the CIL related parts of the Disposal tests.
1 parent 0ebe045 commit d7dc73e

11 files changed

+11
-70
lines changed

csharp/ql/test/library-tests/commons/Disposal/Class1.cs_

Lines changed: 0 additions & 42 deletions
This file was deleted.

csharp/ql/test/library-tests/commons/Disposal/Disposal.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ void IDisposable.Dispose()
1414
Close();
1515
}
1616

17-
public Disposal(IDisposable p1, object p2, System.IO.TextWriter fs)
17+
public Disposal(IDisposable p1, object p2, System.IO.TextWriter fs, IDisposable p3)
1818
{
1919
field1 = p1;
20-
if(p2 is IDisposable d)
20+
if (p2 is IDisposable d)
2121
d.Dispose();
22-
DisposalTests.Class1.Dispose(fs);
22+
fs.Dispose();
2323
}
2424
}
Binary file not shown.

csharp/ql/test/library-tests/commons/Disposal/DisposedFields.expected

Lines changed: 0 additions & 1 deletion
This file was deleted.

csharp/ql/test/library-tests/commons/Disposal/DisposedFields.ql

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
| CapturesDisposable(MyType, MyType) | 0 |
2-
| Dispose(IDisposable) | 0 |
3-
| DisposesParameter(IDisposable, IDisposable) | 0 |
4-
| System.Void DisposalTests.Class1.CapturesDisposable(DisposalTests.MyType,DisposalTests.MyType) | 0 |
5-
| System.Void DisposalTests.Class1.Dispose(System.IDisposable) | 0 |
6-
| System.Void DisposalTests.Class1.DisposesParameter(System.IDisposable,System.IDisposable) | 0 |
1+
| Disposal(IDisposable, object, TextWriter, IDisposable) | 0 |
2+
| Disposal(IDisposable, object, TextWriter, IDisposable) | 1 |
3+
| Disposal(IDisposable, object, TextWriter, IDisposable) | 2 |

csharp/ql/test/library-tests/commons/Disposal/DisposedParameter.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ from DotNet::Callable c, DotNet::Parameter param, int p
55
where
66
mayBeDisposed(param) and
77
param = c.getParameter(p) and
8-
c.getDeclaringType().hasFullyQualifiedName("DisposalTests", "Class1")
8+
c.getDeclaringType().hasFullyQualifiedName("", "Disposal")
99
select c.toStringWithTypes(), p

csharp/ql/test/library-tests/commons/Disposal/DisposedVariables.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
| Disposal.cs:17:33:17:34 | p1 |
33
| Disposal.cs:17:44:17:45 | p2 |
44
| Disposal.cs:17:69:17:70 | fs |
5-
| Disposal.cs:20:30:20:30 | d |
5+
| Disposal.cs:20:31:20:31 | d |
Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
| CapturesDisposable(MyType, MyType) | 1 |
2-
| DisposesParameter(IDisposable, IDisposable) | 1 |
3-
| System.Void DisposalTests.Class1.CapturesDisposable(DisposalTests.MyType,DisposalTests.MyType) | 1 |
4-
| System.Void DisposalTests.Class1.DisposesParameter(System.IDisposable,System.IDisposable) | 1 |
1+
| Disposal(IDisposable, object, TextWriter, IDisposable) | 3 |

csharp/ql/test/library-tests/commons/Disposal/UndisposedParameter.ql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ from DotNet::Callable c, DotNet::Parameter param, int p
66
where
77
not mayBeDisposed(param) and
88
param = c.getParameter(p) and
9-
c.getDeclaringType().hasFullyQualifiedName("DisposalTests", "Class1")
9+
c.getDeclaringType().hasFullyQualifiedName("", "Disposal")
1010
select c.toStringWithTypes(), p

0 commit comments

Comments
 (0)