mirror of
https://github.com/github/codeql.git
synced 2026-04-19 14:04:09 +02:00
C#: Add test for the new lock type.
This commit is contained in:
1
csharp/ql/test/library-tests/statements/Lock3.expected
Normal file
1
csharp/ql/test/library-tests/statements/Lock3.expected
Normal file
@@ -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
csharp/ql/test/library-tests/statements/Lock3.ql
Normal file
8
csharp/ql/test/library-tests/statements/Lock3.ql
Normal file
@@ -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()
|
||||
Reference in New Issue
Block a user