Skip to content

Commit c52dbcb

Browse files
committed
C#: Update all PrintAst test expected output.
1 parent c87668a commit c52dbcb

File tree

24 files changed

+235
-235
lines changed

24 files changed

+235
-235
lines changed

csharp/ql/test/experimental/ir/ir/PrintAst.expected

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -232,21 +232,21 @@ collections.cs:
232232
# 15| -1: [ObjectInitializer] { ..., ... }
233233
# 15| 0: [MemberInitializer] ... = ...
234234
# 15| 0: [FieldAccess] access to field a
235-
# 15| 1: [StringLiteral] "Hello"
235+
# 15| 1: [StringLiteralUtf16] "Hello"
236236
# 15| 1: [MemberInitializer] ... = ...
237237
# 15| 0: [FieldAccess] access to field b
238-
# 15| 1: [StringLiteral] "World"
238+
# 15| 1: [StringLiteralUtf16] "World"
239239
# 16| 1: [ElementInitializer] call to method Add
240240
# 16| 0: [IntLiteral] 1
241241
# 16| 1: [ObjectCreation] object creation of type MyClass
242242
# 16| -2: [TypeMention] MyClass
243243
# 16| -1: [ObjectInitializer] { ..., ... }
244244
# 16| 0: [MemberInitializer] ... = ...
245245
# 16| 0: [FieldAccess] access to field a
246-
# 16| 1: [StringLiteral] "Foo"
246+
# 16| 1: [StringLiteralUtf16] "Foo"
247247
# 16| 1: [MemberInitializer] ... = ...
248248
# 16| 0: [FieldAccess] access to field b
249-
# 16| 1: [StringLiteral] "Bar"
249+
# 16| 1: [StringLiteralUtf16] "Bar"
250250
constructor_init.cs:
251251
# 1| [Class] BaseClass
252252
# 3| 4: [Field] num
@@ -443,7 +443,7 @@ events.cs:
443443
# 32| 0: [LocalVariableAccess] access to local variable result
444444
# 32| 1: [DelegateCall] delegate call
445445
# 32| -1: [LocalVariableAccess] access to local variable obj
446-
# 32| 0: [StringLiteral] "string"
446+
# 32| 0: [StringLiteralUtf16] "string"
447447
# 33| 3: [ExprStmt] ...;
448448
# 33| 0: [MethodCall] call to method RemoveEvent
449449
# 33| -1: [LocalVariableAccess] access to local variable obj
@@ -549,13 +549,13 @@ indexers.cs:
549549
# 22| 0: [IndexerCall] access to indexer
550550
# 22| -1: [LocalVariableAccess] access to local variable inst
551551
# 22| 0: [IntLiteral] 0
552-
# 22| 1: [StringLiteral] "str1"
552+
# 22| 1: [StringLiteralUtf16] "str1"
553553
# 23| 2: [ExprStmt] ...;
554554
# 23| 0: [AssignExpr] ... = ...
555555
# 23| 0: [IndexerCall] access to indexer
556556
# 23| -1: [LocalVariableAccess] access to local variable inst
557557
# 23| 0: [IntLiteral] 1
558-
# 23| 1: [StringLiteral] "str1"
558+
# 23| 1: [StringLiteralUtf16] "str1"
559559
# 24| 3: [ExprStmt] ...;
560560
# 24| 0: [AssignExpr] ... = ...
561561
# 24| 0: [IndexerCall] access to indexer
@@ -775,7 +775,7 @@ jumps.cs:
775775
# 13| 0: [MethodCall] call to method WriteLine
776776
# 13| -1: [TypeAccess] access to type Console
777777
# 13| 0: [TypeMention] Console
778-
# 13| 0: [StringLiteral] "BreakAndContinue"
778+
# 13| 0: [StringLiteralUtf16] "BreakAndContinue"
779779
# 16| 1: [ForStmt] for (...;...;...) ...
780780
# 16| -1: [LocalVariableDeclAndInitExpr] Int32 i = ...
781781
# 16| -1: [TypeMention] int
@@ -831,7 +831,7 @@ jumps.cs:
831831
# 38| 0: [MethodCall] call to method WriteLine
832832
# 38| -1: [TypeAccess] access to type Console
833833
# 38| 0: [TypeMention] Console
834-
# 38| 0: [StringLiteral] "Done"
834+
# 38| 0: [StringLiteralUtf16] "Done"
835835
lock.cs:
836836
# 3| [Class] LockTest
837837
# 5| 5: [Method] A
@@ -1152,9 +1152,9 @@ stmts.cs:
11521152
# 31| 2: [ConstCase] case ...:
11531153
# 31| 0: [ConstantPatternExpr,IntLiteral] 0
11541154
# 32| 3: [GotoCaseStmt] goto case ...;
1155-
# 32| 0: [StringLiteral] "123"
1155+
# 32| 0: [StringLiteralUtf16] "123"
11561156
# 33| 4: [ConstCase] case ...:
1157-
# 33| 0: [ConstantPatternExpr,StringLiteral] "123"
1157+
# 33| 0: [ConstantPatternExpr,StringLiteralUtf16] "123"
11581158
# 34| 5: [ExprStmt] ...;
11591159
# 34| 0: [AssignExpr] ... = ...
11601160
# 34| 0: [LocalVariableAccess] access to local variable select

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ arguments.cs:
232232
# 68| 1: [DefaultAttribute] [My(...)]
233233
# 68| -1: [TypeMention] MyAttribute
234234
# 68| 0: [BoolLiteral] true
235-
# 68| 1: [StringLiteral] ""
235+
# 68| 1: [StringLiteralUtf16] ""
236236
# 68| 2: [IntLiteral] 0
237237
# 69| 4: [BlockStmt] {...}
238238
# 72| [Class] MyAttribute

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
attributes.cs:
22
# 10| [AssemblyAttribute] [assembly: AssemblyTitle(...)]
33
# 10| -1: [TypeMention] AssemblyTitleAttribute
4-
# 10| 0: [StringLiteral] "C# attributes test"
4+
# 10| 0: [StringLiteralUtf16] "C# attributes test"
55
# 11| [AssemblyAttribute] [assembly: AssemblyDescription(...)]
66
# 11| -1: [TypeMention] AssemblyDescriptionAttribute
7-
# 11| 0: [StringLiteral] "A test of C# attributes"
7+
# 11| 0: [StringLiteralUtf16] "A test of C# attributes"
88
# 12| [AssemblyAttribute] [assembly: AssemblyConfiguration(...)]
99
# 12| -1: [TypeMention] AssemblyConfigurationAttribute
10-
# 12| 0: [StringLiteral] ""
10+
# 12| 0: [StringLiteralUtf16] ""
1111
# 13| [AssemblyAttribute] [assembly: AssemblyCompany(...)]
1212
# 13| -1: [TypeMention] AssemblyCompanyAttribute
13-
# 13| 0: [StringLiteral] "Semmle Plc"
13+
# 13| 0: [StringLiteralUtf16] "Semmle Plc"
1414
# 14| [AssemblyAttribute] [assembly: AssemblyProduct(...)]
1515
# 14| -1: [TypeMention] AssemblyProductAttribute
16-
# 14| 0: [StringLiteral] "Odasa"
16+
# 14| 0: [StringLiteralUtf16] "Odasa"
1717
# 15| [AssemblyAttribute] [assembly: AssemblyCopyright(...)]
1818
# 15| -1: [TypeMention] AssemblyCopyrightAttribute
19-
# 15| 0: [StringLiteral] "Copyright © Semmle 2018"
19+
# 15| 0: [StringLiteralUtf16] "Copyright © Semmle 2018"
2020
# 16| [AssemblyAttribute] [assembly: AssemblyTrademark(...)]
2121
# 16| -1: [TypeMention] AssemblyTrademarkAttribute
22-
# 16| 0: [StringLiteral] ""
22+
# 16| 0: [StringLiteralUtf16] ""
2323
# 17| [AssemblyAttribute] [assembly: AssemblyCulture(...)]
2424
# 17| -1: [TypeMention] AssemblyCultureAttribute
25-
# 17| 0: [StringLiteral] ""
25+
# 17| 0: [StringLiteralUtf16] ""
2626
# 22| [AssemblyAttribute] [assembly: ComVisible(...)]
2727
# 22| -1: [TypeMention] ComVisibleAttribute
2828
# 22| 0: [BoolLiteral] false
2929
# 25| [AssemblyAttribute] [assembly: Guid(...)]
3030
# 25| -1: [TypeMention] GuidAttribute
31-
# 25| 0: [StringLiteral] "2f70fdd6-14aa-4850-b053-d547adb1f476"
31+
# 25| 0: [StringLiteralUtf16] "2f70fdd6-14aa-4850-b053-d547adb1f476"
3232
# 37| [AssemblyAttribute] [assembly: AssemblyVersion(...)]
3333
# 37| -1: [TypeMention] AssemblyVersionAttribute
34-
# 37| 0: [StringLiteral] "1.0.0.0"
34+
# 37| 0: [StringLiteralUtf16] "1.0.0.0"
3535
# 38| [AssemblyAttribute] [assembly: AssemblyFileVersion(...)]
3636
# 38| -1: [TypeMention] AssemblyFileVersionAttribute
37-
# 38| 0: [StringLiteral] "1.0.0.0"
37+
# 38| 0: [StringLiteralUtf16] "1.0.0.0"
3838
# 40| [AssemblyAttribute] [assembly: Args(...)]
3939
# 40| -1: [TypeMention] ArgsAttribute
4040
# 40| 0: [IntLiteral] 0
@@ -107,7 +107,7 @@ attributes.cs:
107107
#-----| 0: (Attributes)
108108
# 46| 1: [DefaultAttribute] [Conditional(...)]
109109
# 46| -1: [TypeMention] ConditionalAttribute
110-
# 46| 0: [StringLiteral] "DEBUG2"
110+
# 46| 0: [StringLiteralUtf16] "DEBUG2"
111111
# 47| 4: [BlockStmt] {...}
112112
# 50| [Class] Bar
113113
# 52| 5: [Method] inc
@@ -136,7 +136,7 @@ attributes.cs:
136136
# 57| 1: [DefaultAttribute] [My(...)]
137137
# 57| -1: [TypeMention] MyAttribute
138138
# 57| 0: [BoolLiteral] true
139-
# 57| 1: [StringLiteral] ""
139+
# 57| 1: [StringLiteralUtf16] ""
140140
# 57| 2: [IntLiteral] 0
141141
# 58| 2: [DefaultAttribute] [My2(...)]
142142
# 58| -1: [TypeMention] My2Attribute

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ comments2.cs:
4343
# 52| 3: [Getter] get_S1
4444
# 52| 4: [BlockStmt] {...}
4545
# 52| 0: [ReturnStmt] return ...;
46-
# 52| 0: [StringLiteral] ""
46+
# 52| 0: [StringLiteralUtf16] ""
4747
# 53| 4: [Setter] set_S1
4848
#-----| 2: (Parameters)
4949
# 53| 0: [Parameter] value

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

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ csharp6.cs:
3434
# 25| 0: [InterpolatedStringExpr] $"..."
3535
# 25| 0: [NameOfExpr] nameof(...)
3636
# 25| 0: [LocalVariableAccess] access to local variable foo
37-
# 25| 1: [StringLiteral] " is "
37+
# 25| 1: [StringLiteralUtf16] " is "
3838
# 25| 2: [LocalVariableAccess] access to local variable foo
39-
# 25| 3: [StringLiteral] ", and "
39+
# 25| 3: [StringLiteralUtf16] ", and "
4040
# 25| 4: [NameOfExpr] nameof(...)
4141
# 25| 0: [LocalVariableAccess] access to local variable bar
42-
# 25| 5: [StringLiteral] " has length "
42+
# 25| 5: [StringLiteralUtf16] " has length "
4343
# 25| 6: [NullCoalescingExpr] ... ?? ...
4444
# 25| 0: [PropertyCall] access to property Length
4545
# 25| -1: [LocalVariableAccess] access to local variable bar
@@ -49,12 +49,12 @@ csharp6.cs:
4949
# 27| 0: [InterpolatedStringExpr] $"..."
5050
# 27| 0: [NameOfExpr] nameof(...)
5151
# 27| 0: [LocalVariableAccess] access to local variable foo
52-
# 27| 1: [StringLiteral] " is "
52+
# 27| 1: [StringLiteralUtf16] " is "
5353
# 27| 2: [LocalVariableAccess] access to local variable foo
54-
# 27| 3: [StringLiteral] ", and "
54+
# 27| 3: [StringLiteralUtf16] ", and "
5555
# 27| 4: [NameOfExpr] nameof(...)
5656
# 27| 0: [LocalVariableAccess] access to local variable bar
57-
# 27| 5: [StringLiteral] " has length "
57+
# 27| 5: [StringLiteralUtf16] " has length "
5858
# 27| 6: [NullCoalescingExpr] ... ?? ...
5959
# 27| 0: [PropertyCall] access to property Length
6060
# 27| -1: [LocalVariableAccess] access to local variable bar
@@ -184,15 +184,15 @@ csharp6.cs:
184184
# 68| 0: [MemberInitializer] ... = ...
185185
# 68| 0: [IndexerCall] access to indexer
186186
# 68| 0: [IntLiteral] 0
187-
# 68| 1: [StringLiteral] "Zero"
187+
# 68| 1: [StringLiteralUtf16] "Zero"
188188
# 68| 1: [MemberInitializer] ... = ...
189189
# 68| 0: [IndexerCall] access to indexer
190190
# 68| 0: [IntLiteral] 1
191-
# 68| 1: [StringLiteral] "One"
191+
# 68| 1: [StringLiteralUtf16] "One"
192192
# 68| 2: [MemberInitializer] ... = ...
193193
# 68| 0: [IndexerCall] access to indexer
194194
# 68| 0: [IntLiteral] 2
195-
# 68| 1: [StringLiteral] "Two"
195+
# 68| 1: [StringLiteralUtf16] "Two"
196196
# 71| 1: [LocalVariableDeclStmt] ... ...;
197197
# 71| 0: [LocalVariableDeclAndInitExpr] Compound compound = ...
198198
# 71| -1: [TypeMention] Compound
@@ -206,75 +206,75 @@ csharp6.cs:
206206
# 73| 0: [MemberInitializer] ... = ...
207207
# 73| 0: [IndexerCall] access to indexer
208208
# 73| 0: [IntLiteral] 0
209-
# 73| 1: [StringLiteral] "Zero"
209+
# 73| 1: [StringLiteralUtf16] "Zero"
210210
# 73| 1: [MemberInitializer] ... = ...
211211
# 73| 0: [IndexerCall] access to indexer
212212
# 73| 0: [IntLiteral] 1
213-
# 73| 1: [StringLiteral] "One"
213+
# 73| 1: [StringLiteralUtf16] "One"
214214
# 73| 2: [MemberInitializer] ... = ...
215215
# 73| 0: [IndexerCall] access to indexer
216216
# 73| 0: [IntLiteral] 2
217-
# 73| 1: [StringLiteral] "Two"
217+
# 73| 1: [StringLiteralUtf16] "Two"
218218
# 74| 1: [MemberInitializer] ... = ...
219219
# 74| 0: [PropertyCall] access to property DictionaryProperty
220220
# 74| 1: [ObjectInitializer] { ..., ... }
221221
# 74| 0: [MemberInitializer] ... = ...
222222
# 74| 0: [IndexerCall] access to indexer
223223
# 74| 0: [IntLiteral] 3
224-
# 74| 1: [StringLiteral] "Three"
224+
# 74| 1: [StringLiteralUtf16] "Three"
225225
# 74| 1: [MemberInitializer] ... = ...
226226
# 74| 0: [IndexerCall] access to indexer
227227
# 74| 0: [IntLiteral] 2
228-
# 74| 1: [StringLiteral] "Two"
228+
# 74| 1: [StringLiteralUtf16] "Two"
229229
# 74| 2: [MemberInitializer] ... = ...
230230
# 74| 0: [IndexerCall] access to indexer
231231
# 74| 0: [IntLiteral] 1
232-
# 74| 1: [StringLiteral] "One"
232+
# 74| 1: [StringLiteralUtf16] "One"
233233
# 75| 2: [MemberInitializer] ... = ...
234234
# 75| 0: [FieldAccess] access to field ArrayField
235235
# 75| 1: [ObjectInitializer] { ..., ... }
236236
# 75| 0: [MemberInitializer] ... = ...
237237
# 75| 0: [ArrayAccess] access to array element
238238
# 75| 0: [IntLiteral] 0
239-
# 75| 1: [StringLiteral] "Zero"
239+
# 75| 1: [StringLiteralUtf16] "Zero"
240240
# 75| 1: [MemberInitializer] ... = ...
241241
# 75| 0: [ArrayAccess] access to array element
242242
# 75| 0: [IntLiteral] 1
243-
# 75| 1: [StringLiteral] "One"
243+
# 75| 1: [StringLiteralUtf16] "One"
244244
# 76| 3: [MemberInitializer] ... = ...
245245
# 76| 0: [FieldAccess] access to field ArrayField2
246246
# 76| 1: [ObjectInitializer] { ..., ... }
247247
# 76| 0: [MemberInitializer] ... = ...
248248
# 76| 0: [ArrayAccess] access to array element
249249
# 76| 0: [IntLiteral] 0
250250
# 76| 1: [IntLiteral] 1
251-
# 76| 1: [StringLiteral] "i"
251+
# 76| 1: [StringLiteralUtf16] "i"
252252
# 76| 1: [MemberInitializer] ... = ...
253253
# 76| 0: [ArrayAccess] access to array element
254254
# 76| 0: [IntLiteral] 1
255255
# 76| 1: [IntLiteral] 0
256-
# 76| 1: [StringLiteral] "1"
256+
# 76| 1: [StringLiteralUtf16] "1"
257257
# 77| 4: [MemberInitializer] ... = ...
258258
# 77| 0: [PropertyCall] access to property ArrayProperty
259259
# 77| 1: [ObjectInitializer] { ..., ... }
260260
# 77| 0: [MemberInitializer] ... = ...
261261
# 77| 0: [ArrayAccess] access to array element
262262
# 77| 0: [IntLiteral] 1
263-
# 77| 1: [StringLiteral] "One"
263+
# 77| 1: [StringLiteralUtf16] "One"
264264
# 77| 1: [MemberInitializer] ... = ...
265265
# 77| 0: [ArrayAccess] access to array element
266266
# 77| 0: [IntLiteral] 2
267-
# 77| 1: [StringLiteral] "Two"
267+
# 77| 1: [StringLiteralUtf16] "Two"
268268
# 78| 5: [MemberInitializer] ... = ...
269269
# 78| 0: [PropertyCall] access to property ArrayProperty2
270270
# 78| 1: [ObjectInitializer] { ..., ... }
271271
# 78| 0: [MemberInitializer] ... = ...
272272
# 78| 0: [ArrayAccess] access to array element
273273
# 78| 0: [IntLiteral] 0
274274
# 78| 1: [IntLiteral] 1
275-
# 78| 1: [StringLiteral] "i"
275+
# 78| 1: [StringLiteralUtf16] "i"
276276
# 78| 1: [MemberInitializer] ... = ...
277277
# 78| 0: [ArrayAccess] access to array element
278278
# 78| 0: [IntLiteral] 1
279279
# 78| 1: [IntLiteral] 0
280-
# 78| 1: [StringLiteral] "1"
280+
# 78| 1: [StringLiteralUtf16] "1"

csharp/ql/test/library-tests/csharp7.1/PrintAst.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ csharp71.cs:
6262
# 24| 1: [IsExpr] ... is ...
6363
# 24| 0: [ObjectCreation] object creation of type Object
6464
# 24| 0: [TypeMention] object
65-
# 24| 1: [ConstantPatternExpr,StringLiteral] "abc"
65+
# 24| 1: [ConstantPatternExpr,StringLiteralUtf16] "abc"
6666
# 25| 2: [ExprStmt] ...;
6767
# 25| 0: [AssignExpr] ... = ...
6868
# 25| 0: [LocalVariableAccess] access to local variable b
6969
# 25| 1: [IsExpr] ... is ...
70-
# 25| 0: [StringLiteral] ""
70+
# 25| 0: [StringLiteralUtf16] ""
7171
# 25| 1: [ConstantPatternExpr,NullLiteral] null
7272
# 26| 3: [ExprStmt] ...;
7373
# 26| 0: [AssignExpr] ... = ...

csharp/ql/test/library-tests/csharp7.3/PrintAst.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,5 +109,5 @@ csharp73.cs:
109109
# 51| -1: [TypeAccess] access to type Console
110110
# 51| 0: [TypeMention] Console
111111
# 51| 0: [InterpolatedStringExpr] $"..."
112-
# 51| 0: [StringLiteral] "x is "
112+
# 51| 0: [StringLiteralUtf16] "x is "
113113
# 51| 1: [LocalVariableAccess] access to local variable x

0 commit comments

Comments
 (0)