Skip to content

Commit 0ba9b80

Browse files
committed
C#: Add some more partial class related tests.
1 parent 12dc65d commit 0ba9b80

File tree

6 files changed

+17
-0
lines changed

6 files changed

+17
-0
lines changed

csharp/ql/test/library-tests/partial/Partial1.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@
1010
| Partial.cs:28:9:28:11 | set_Item |
1111
| Partial.cs:32:15:32:33 | OnePartPartialClass |
1212
| Partial.cs:34:18:34:42 | PartialMethodWithoutBody2 |
13+
| PartialMultipleFiles1.cs:1:22:1:41 | PartialMultipleFiles |
14+
| PartialMultipleFiles2.cs:1:22:1:41 | PartialMultipleFiles |
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
| Partial.cs:1:15:1:26 | TwoPartClass | Partial.cs:1:15:1:26 | {...} |
2+
| Partial.cs:32:15:32:33 | OnePartPartialClass | Partial.cs:32:15:32:33 | {...} |
3+
| Partial.cs:38:7:38:21 | NonPartialClass | Partial.cs:38:7:38:21 | {...} |
4+
| PartialMultipleFiles1.cs:1:22:1:41 | PartialMultipleFiles | PartialMultipleFiles1.cs:1:22:1:41 | {...} |
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import csharp
2+
3+
from Constructor c
4+
where c.getDeclaringType().fromSource()
5+
select c, c.getBody()
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
public partial class PartialMultipleFiles { }
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
public partial class PartialMultipleFiles { }

csharp/ql/test/library-tests/partial/PrintAst.expected

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,7 @@ Partial.cs:
8989
# 42| 0: [Parameter] index
9090
# 45| 1: [Parameter] value
9191
# 45| 4: [BlockStmt] {...}
92+
PartialMultipleFiles1.cs:
93+
# 1| [Class] PartialMultipleFiles
94+
PartialMultipleFiles2.cs:
95+
# 1| [Class] PartialMultipleFiles

0 commit comments

Comments
 (0)