Skip to content

Commit

Permalink
C#: Add test for the new lock type.
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelnebel committed Dec 20, 2024
1 parent 29a0db8 commit 1aa7c3f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions csharp/ql/test/library-tests/statements/Lock3.expected
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
| statements.cs:285:13:288:13 | lock (...) {...} | statements.cs:285:19:285:28 | access to field lockObject | Lock | statements.cs:286:13:288:13 | {...} |
8 changes: 8 additions & 0 deletions csharp/ql/test/library-tests/statements/Lock3.ql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import csharp

from Method m, LockStmt ls, Expr lockExpr
where
ls.getEnclosingCallable() = m and
m.getName() = "LockMethod" and
lockExpr = ls.getExpr()
select ls, lockExpr, lockExpr.getType().toString(), ls.getBlock()

0 comments on commit 1aa7c3f

Please sign in to comment.