Skip to content

Commit 357638b

Browse files
committed
C#: Update variable capture test
1 parent 038afc4 commit 357638b

File tree

5 files changed

+101
-83
lines changed

5 files changed

+101
-83
lines changed

csharp/ql/test/library-tests/dataflow/global/Capture.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,11 @@ void M12()
327327
{
328328
var x = "taint source";
329329

330-
void CapturedLocalFunction() => Check(x); // missing flow from line 328
330+
void CapturedLocalFunction() => Check(x);
331331

332332
void CapturingLocalFunction() => CapturedLocalFunction();
333+
334+
CapturingLocalFunction();
333335
}
334336

335337
void M13()

csharp/ql/test/library-tests/dataflow/global/DataFlow.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
| Capture.cs:312:15:312:15 | access to local variable x |
2828
| Capture.cs:319:19:319:19 | access to local variable x |
2929
| Capture.cs:330:47:330:47 | access to local variable x |
30-
| Capture.cs:339:45:339:45 | access to local variable x |
30+
| Capture.cs:341:45:341:45 | access to local variable x |
3131
| GlobalDataFlow.cs:19:15:19:29 | access to field SinkField0 |
3232
| GlobalDataFlow.cs:27:15:27:32 | access to property SinkProperty0 |
3333
| GlobalDataFlow.cs:45:50:45:59 | access to parameter sinkParam2 |

0 commit comments

Comments
 (0)