Skip to content

Commit c93e438

Browse files
committed
C#: Add a test for a comment with a mapped location
1 parent 655fa53 commit c93e438

File tree

7 files changed

+7
-1
lines changed

7 files changed

+7
-1
lines changed

csharp/ql/test/library-tests/comments/BindingAfter.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,5 @@
5757
| comments2.cs:127:20:127:23 | // ... | comments2.cs:128:9:128:17 | return ...; | x |
5858
| trivia.cs:1:1:3:15 | // ... | trivia.cs:14:7:14:9 | Tr1 | |
5959
| trivia.cs:13:89:13:103 | // ... | trivia.cs:14:7:14:9 | Tr1 | New checksum |
60+
| trivia.cs:19:16:19:46 | // ... | comments1.cs:2:9:2:14 | ... ...; | A mapped single-line comment |
6061
| trivia.cs:25:14:25:38 | // ... | trivia.cs:26:9:26:17 | ... ...; | numbering not affected |

csharp/ql/test/library-tests/comments/BindingBefore.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,5 @@
4848
| comments2.cs:124:5:124:16 | // ... | comments2.cs:119:11:119:25 | GenericClass`1 | GenericFn |
4949
| comments2.cs:127:20:127:23 | // ... | comments2.cs:127:9:127:18 | ... ...; | x |
5050
| comments2.cs:132:1:132:21 | // ... | comments2.cs:11:7:11:8 | C2 | End of comment2.cs |
51+
| trivia.cs:19:16:19:46 | // ... | comments1.cs:1:9:1:14 | ... ...; | A mapped single-line comment |
5152
| trivia.cs:25:14:25:38 | // ... | trivia.cs:24:9:24:16 | ... ...; | numbering not affected |

csharp/ql/test/library-tests/comments/BindingParent.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
| comments2.cs:121:17:121:20 | // ... | comments2.cs:119:11:119:25 | GenericClass`1 | f |
4848
| comments2.cs:124:5:124:16 | // ... | comments2.cs:11:7:11:8 | C2 | GenericFn |
4949
| comments2.cs:127:20:127:23 | // ... | comments2.cs:126:5:129:5 | {...} | x |
50+
| trivia.cs:19:16:19:46 | // ... | trivia.cs:17:5:29:5 | {...} | A mapped single-line comment |
5051
| trivia.cs:25:14:25:38 | // ... | trivia.cs:17:5:29:5 | {...} | numbering not affected |
5152
| trivia.cs:49:18:49:82 | // ... | trivia.cs:48:5:58:5 | {...} | Sets the nullable annotation and warning contexts to disabled. |
5253
| trivia.cs:50:17:50:80 | // ... | trivia.cs:48:5:58:5 | {...} | Sets the nullable annotation and warning contexts to enabled. |

csharp/ql/test/library-tests/comments/Bindings.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
| comments2.cs:124:5:124:16 | // ... | comments2.cs:125:9:125:20 | GenericFn`1 | GenericFn |
5151
| comments2.cs:127:20:127:23 | // ... | comments2.cs:127:9:127:18 | ... ...; | x |
5252
| trivia.cs:13:89:13:103 | // ... | trivia.cs:14:7:14:9 | Tr1 | New checksum |
53+
| trivia.cs:19:16:19:46 | // ... | comments1.cs:1:9:1:14 | ... ...; | A mapped single-line comment |
5354
| trivia.cs:25:14:25:38 | // ... | trivia.cs:17:5:29:5 | {...} | numbering not affected |
5455
| trivia.cs:49:18:49:82 | // ... | trivia.cs:48:5:58:5 | {...} | Sets the nullable annotation and warning contexts to disabled. |
5556
| trivia.cs:50:17:50:80 | // ... | trivia.cs:48:5:58:5 | {...} | Sets the nullable annotation and warning contexts to enabled. |

csharp/ql/test/library-tests/comments/Comments.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ singlelineComment
7474
| trivia.cs:1:1:3:15 | // ... | trivia.cs:2:1:2:21 | // ... | 3 | Start of trivia.cs | // Start of trivia.cs |
7575
| trivia.cs:1:1:3:15 | // ... | trivia.cs:3:1:3:15 | // ... | 3 | Unassociated | // Unassociated |
7676
| trivia.cs:13:89:13:103 | // ... | trivia.cs:13:89:13:103 | // ... | 1 | New checksum | // New checksum |
77+
| trivia.cs:19:16:19:46 | // ... | trivia.cs:19:16:19:46 | // ... | 1 | A mapped single-line comment | // A mapped single-line comment |
7778
| trivia.cs:25:14:25:38 | // ... | trivia.cs:25:14:25:38 | // ... | 1 | numbering not affected | // numbering not affected |
7879
| trivia.cs:49:18:49:82 | // ... | trivia.cs:49:18:49:82 | // ... | 1 | Sets the nullable annotation and warning contexts to disabled. | // Sets the nullable annotation and warning contexts to disabled. |
7980
| trivia.cs:50:17:50:80 | // ... | trivia.cs:50:17:50:80 | // ... | 1 | Sets the nullable annotation and warning contexts to enabled. | // Sets the nullable annotation and warning contexts to enabled. |

csharp/ql/test/library-tests/comments/LineDirectives.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ mapped
1616
| trivia.cs:19:9:19:11 | trivia.cs:19:9:19:11 | comments1.cs:1:9:1:11 | comments1.cs:1:9:1:11 |
1717
| trivia.cs:19:9:19:14 | trivia.cs:19:9:19:14 | comments1.cs:1:9:1:14 | comments1.cs:1:9:1:14 |
1818
| trivia.cs:19:13:19:13 | trivia.cs:19:13:19:13 | comments1.cs:1:13:1:13 | comments1.cs:1:13:1:13 |
19+
| trivia.cs:19:16:19:46 | trivia.cs:19:16:19:46 | comments1.cs:1:16:1:46 | comments1.cs:1:16:1:46 |
1920
| trivia.cs:20:9:20:11 | trivia.cs:20:9:20:11 | comments1.cs:2:9:2:11 | comments1.cs:2:9:2:11 |
2021
| trivia.cs:20:9:20:14 | trivia.cs:20:9:20:14 | comments1.cs:2:9:2:14 | comments1.cs:2:9:2:14 |
2122
| trivia.cs:20:13:20:13 | trivia.cs:20:13:20:13 | comments1.cs:2:13:2:13 | comments1.cs:2:13:2:13 |

csharp/ql/test/library-tests/comments/trivia.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Tr1
1616
static void M1()
1717
{
1818
#line 1 "comments1.cs"
19-
int i;
19+
int i; // A mapped single-line comment
2020
int j;
2121
#line default
2222
char c;

0 commit comments

Comments
 (0)