Skip to content

Commit 1d8f8f7

Browse files
committed
C#: Add const interpolated string test case.
1 parent 5b89f0e commit 1d8f8f7

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
inserts
2+
| ConstInterpolatedString.cs:6:38:6:53 | $"..." | ConstInterpolatedString.cs:6:41:6:45 | access to constant hello |
3+
| ConstInterpolatedString.cs:7:44:7:65 | $"..." | ConstInterpolatedString.cs:7:54:7:63 | access to constant helloWorld |
4+
texts
5+
| ConstInterpolatedString.cs:6:38:6:53 | $"..." | ConstInterpolatedString.cs:6:47:6:52 | " World" |
6+
| ConstInterpolatedString.cs:7:44:7:65 | $"..." | ConstInterpolatedString.cs:7:46:7:52 | "Really " |
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import csharp
2+
3+
query predicate inserts(InterpolatedStringExpr expr, Expr e) { expr.getAnInsert() = e }
4+
5+
query predicate texts(InterpolatedStringExpr expr, StringLiteral literal) {
6+
expr.getAText() = literal
7+
}

0 commit comments

Comments
 (0)