C#: Add some partial tests for Properties and Indexers.

This commit is contained in:
Michael Nebel
2025-01-20 14:05:35 +01:00
parent 5836c8d0ce
commit 568fd9c748
6 changed files with 33 additions and 0 deletions

View File

@@ -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 |

View 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)

View File

@@ -0,0 +1,2 @@
| Partial.cs:9:27:9:30 | Item | true |
| Partial.cs:42:19:42:22 | Item | false |

View 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)

View File

@@ -0,0 +1,2 @@
| Partial.cs:7:27:7:42 | PartialProperty1 | true |
| Partial.cs:41:19:41:26 | Property | false |

View File

@@ -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)