mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
C#: Add some partial tests for Properties and Indexers.
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
| Partial.cs:7:46:7:48 | get_PartialProperty1 | true |
|
||||
| Partial.cs:7:51:7:53 | set_PartialProperty1 | true |
|
||||
| Partial.cs:9:45:9:47 | get_Item | true |
|
||||
| Partial.cs:9:50:9:52 | set_Item | true |
|
||||
| Partial.cs:41:30:41:32 | get_Property | false |
|
||||
| Partial.cs:41:35:41:37 | set_Property | false |
|
||||
| Partial.cs:44:9:44:11 | get_Item | false |
|
||||
| Partial.cs:45:9:45:11 | set_Item | false |
|
||||
7
csharp/ql/test/library-tests/partial/PartialAccessors.ql
Normal file
7
csharp/ql/test/library-tests/partial/PartialAccessors.ql
Normal file
@@ -0,0 +1,7 @@
|
||||
import csharp
|
||||
|
||||
private boolean isPartial(Accessor a) { if a.isPartial() then result = true else result = false }
|
||||
|
||||
from Accessor a
|
||||
where a.fromSource()
|
||||
select a, isPartial(a)
|
||||
@@ -0,0 +1,2 @@
|
||||
| Partial.cs:9:27:9:30 | Item | true |
|
||||
| Partial.cs:42:19:42:22 | Item | false |
|
||||
7
csharp/ql/test/library-tests/partial/PartialIndexers.ql
Normal file
7
csharp/ql/test/library-tests/partial/PartialIndexers.ql
Normal file
@@ -0,0 +1,7 @@
|
||||
import csharp
|
||||
|
||||
private boolean isPartial(Indexer i) { if i.isPartial() then result = true else result = false }
|
||||
|
||||
from Indexer i
|
||||
where i.fromSource()
|
||||
select i, isPartial(i)
|
||||
@@ -0,0 +1,2 @@
|
||||
| Partial.cs:7:27:7:42 | PartialProperty1 | true |
|
||||
| Partial.cs:41:19:41:26 | Property | false |
|
||||
@@ -0,0 +1,7 @@
|
||||
import csharp
|
||||
|
||||
private boolean isPartial(Property p) { if p.isPartial() then result = true else result = false }
|
||||
|
||||
from Property p
|
||||
where p.fromSource()
|
||||
select p, isPartial(p)
|
||||
Reference in New Issue
Block a user