Skip to content

Commit bc7cb1e

Browse files
committed
C#: Fix some qltests.
1 parent 949d449 commit bc7cb1e

File tree

8 files changed

+41
-115
lines changed

8 files changed

+41
-115
lines changed

csharp/ql/test/experimental/CWE-918/RequestForgery.cs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,3 @@ public async Task<ActionResult> Good(string url)
3838
}
3939
}
4040
}
41-
// Missing stubs:
42-
namespace System.Net.Http
43-
{
44-
public class HttpClient
45-
{
46-
public async Task SendAsync(HttpRequestMessage request) => throw null;
47-
}
48-
49-
public class HttpRequestMessage
50-
{
51-
public HttpRequestMessage(HttpMethod method, string requestUri) => throw null;
52-
}
53-
54-
public class HttpMethod
55-
{
56-
public static readonly HttpMethod Get;
57-
}
58-
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
semmle-extractor-options: /r:System.Net.Http.dll

csharp/ql/test/library-tests/dataflow/library/FlowSummaries.expected

Lines changed: 19 additions & 28 deletions
Large diffs are not rendered by default.

csharp/ql/test/library-tests/dataflow/library/FlowSummariesFiltered.expected

Lines changed: 19 additions & 28 deletions
Large diffs are not rendered by default.

csharp/ql/test/query-tests/Security Features/CWE-079/StoredXSS/XSS.cs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -135,21 +135,3 @@ public string ToHtmlString()
135135
}
136136
}
137137
}
138-
139-
namespace System.Net
140-
{
141-
public class HttpListenerResponse
142-
{
143-
public System.IO.Stream OutputStream => null;
144-
}
145-
146-
class HttpListenerContext
147-
{
148-
public HttpListenerResponse Response => null;
149-
}
150-
151-
class HttpListener
152-
{
153-
public HttpListenerContext GetContext() => null;
154-
}
155-
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
semmle-extractor-options: ${testdir}/../../../../resources/stubs/System.Net.cs
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
semmle-extractor-options: /r:System.Data.Common.dll

csharp/ql/test/query-tests/Security Features/CWE-327/InsecureSQLConnection/stubs.cs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,29 +12,6 @@ public interface IDbConnection : System.IDisposable
1212

1313
namespace Common
1414
{
15-
// Generated from `System.Data.Common.DbConnectionStringBuilder` in `System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089`
16-
public class DbConnectionStringBuilder : System.Collections.IEnumerable, System.Collections.IDictionary, System.Collections.ICollection
17-
{
18-
System.Collections.IDictionaryEnumerator System.Collections.IDictionary.GetEnumerator() => throw null;
19-
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() => throw null;
20-
bool System.Collections.ICollection.IsSynchronized { get => throw null; }
21-
bool System.Collections.IDictionary.Contains(object keyword) => throw null;
22-
object System.Collections.ICollection.SyncRoot { get => throw null; }
23-
public object this[object keyword] { get => throw null; set => throw null; }
24-
public bool IsReadOnly { get => throw null; }
25-
public override string ToString() => throw null;
26-
public string ConnectionString { get => throw null; set => throw null; }
27-
public virtual System.Collections.ICollection Keys { get => throw null; }
28-
public virtual System.Collections.ICollection Values { get => throw null; }
29-
public virtual bool IsFixedSize { get => throw null; }
30-
public virtual int Count { get => throw null; }
31-
public virtual void Clear() => throw null;
32-
void System.Collections.ICollection.CopyTo(System.Array array, int index) => throw null;
33-
void System.Collections.IDictionary.Add(object keyword, object value) => throw null;
34-
void System.Collections.IDictionary.Remove(object keyword) => throw null;
35-
public void Dispose() => throw null;
36-
}
37-
3815
// Generated from `System.Data.Common.DbConnection` in `System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089`
3916
abstract public class DbConnection : System.IDisposable, System.Data.IDbConnection
4017
{

0 commit comments

Comments
 (0)