From 43c6e7d2500ea7518a55a8794bc7270c5f3b491b Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Mon, 16 Feb 2026 15:29:01 +0100 Subject: [PATCH] C#: Update test expected output. --- .../library-tests/dispatch/CallGraph.expected | 4 +-- .../library-tests/partial/Partial1.expected | 3 ++ .../partial/PartialAccessors.expected | 4 +-- .../partial/PartialEvents.expected | 2 +- .../library-tests/partial/PrintAst.expected | 30 ++++++++++--------- 5 files changed, 24 insertions(+), 19 deletions(-) diff --git a/csharp/ql/test/library-tests/dispatch/CallGraph.expected b/csharp/ql/test/library-tests/dispatch/CallGraph.expected index 0ed729859a4..2feb959dd86 100644 --- a/csharp/ql/test/library-tests/dispatch/CallGraph.expected +++ b/csharp/ql/test/library-tests/dispatch/CallGraph.expected @@ -270,9 +270,9 @@ | ViableCallable.cs:679:17:679:20 | Run3 | ViableCallable.cs:637:21:637:21 | M | | ViableCallable.cs:679:17:679:20 | Run3 | ViableCallable.cs:646:21:646:21 | M | | ViableCallable.cs:679:17:679:20 | Run3 | ViableCallable.cs:648:21:648:21 | M | -| ViableCallable.cs:709:17:709:20 | Run1 | ViableCallable.cs:698:43:698:47 | add_Event | -| ViableCallable.cs:709:17:709:20 | Run1 | ViableCallable.cs:698:43:698:47 | remove_Event | | ViableCallable.cs:709:17:709:20 | Run1 | ViableCallable.cs:703:42:703:44 | get_Property | | ViableCallable.cs:709:17:709:20 | Run1 | ViableCallable.cs:703:63:703:65 | set_Property | | ViableCallable.cs:709:17:709:20 | Run1 | ViableCallable.cs:705:49:705:51 | get_Item | | ViableCallable.cs:709:17:709:20 | Run1 | ViableCallable.cs:705:70:705:72 | set_Item | +| ViableCallable.cs:709:17:709:20 | Run1 | ViableCallable.cs:706:51:706:53 | add_Event | +| ViableCallable.cs:709:17:709:20 | Run1 | ViableCallable.cs:706:59:706:64 | remove_Event | diff --git a/csharp/ql/test/library-tests/partial/Partial1.expected b/csharp/ql/test/library-tests/partial/Partial1.expected index 3fd8b9e2fd4..fe8f5658f48 100644 --- a/csharp/ql/test/library-tests/partial/Partial1.expected +++ b/csharp/ql/test/library-tests/partial/Partial1.expected @@ -8,6 +8,9 @@ | Partial.cs:29:27:29:30 | Item | | Partial.cs:31:9:31:11 | get_Item | | Partial.cs:32:9:32:11 | set_Item | +| Partial.cs:36:39:36:51 | PartialEvent1 | +| Partial.cs:36:55:36:57 | add_PartialEvent1 | +| Partial.cs:36:63:36:68 | remove_PartialEvent1 | | Partial.cs:39:15:39:33 | OnePartPartialClass | | Partial.cs:41:18:41:42 | PartialMethodWithoutBody2 | | PartialMultipleFiles1.cs:1:22:1:41 | PartialMultipleFiles | diff --git a/csharp/ql/test/library-tests/partial/PartialAccessors.expected b/csharp/ql/test/library-tests/partial/PartialAccessors.expected index e9180ffce56..a9d70645420 100644 --- a/csharp/ql/test/library-tests/partial/PartialAccessors.expected +++ b/csharp/ql/test/library-tests/partial/PartialAccessors.expected @@ -1,9 +1,9 @@ -| Partial.cs:13:39:13:51 | add_PartialEvent1 | false | -| Partial.cs:13:39:13:51 | remove_PartialEvent1 | false | | Partial.cs:24:9:24:11 | get_PartialProperty1 | true | | Partial.cs:25:9:25:11 | set_PartialProperty1 | true | | Partial.cs:31:9:31:11 | get_Item | true | | Partial.cs:32:9:32:11 | set_Item | true | +| Partial.cs:36:55:36:57 | add_PartialEvent1 | true | +| Partial.cs:36:63:36:68 | remove_PartialEvent1 | true | | Partial.cs:48:30:48:32 | get_Property | false | | Partial.cs:48:35:48:37 | set_Property | false | | Partial.cs:51:9:51:11 | get_Item | false | diff --git a/csharp/ql/test/library-tests/partial/PartialEvents.expected b/csharp/ql/test/library-tests/partial/PartialEvents.expected index e3ee325248a..b12f8a07a9d 100644 --- a/csharp/ql/test/library-tests/partial/PartialEvents.expected +++ b/csharp/ql/test/library-tests/partial/PartialEvents.expected @@ -1,2 +1,2 @@ -| Partial.cs:13:39:13:51 | PartialEvent1 | false | +| Partial.cs:36:39:36:51 | PartialEvent1 | true | | Partial.cs:54:31:54:35 | Event | false | diff --git a/csharp/ql/test/library-tests/partial/PrintAst.expected b/csharp/ql/test/library-tests/partial/PrintAst.expected index 90471e0a80c..315de869fb3 100644 --- a/csharp/ql/test/library-tests/partial/PrintAst.expected +++ b/csharp/ql/test/library-tests/partial/PrintAst.expected @@ -5,23 +5,15 @@ Partial.cs: # 7| 7: [Method] Method2 # 7| -1: [TypeMention] Void # 7| 4: [BlockStmt] {...} -# 13| 8: [Event] PartialEvent1 -# 13| -1: [TypeMention] EventHandler -# 13| 3: [AddEventAccessor] add_PartialEvent1 -#-----| 2: (Parameters) -# 13| 0: [Parameter] value -# 13| 4: [RemoveEventAccessor] remove_PartialEvent1 -#-----| 2: (Parameters) -# 13| 0: [Parameter] value -# 18| 9: [Method] PartialMethodWithBody1 +# 18| 8: [Method] PartialMethodWithBody1 # 5| -1: [TypeMention] Void # 18| 4: [BlockStmt] {...} -# 19| 10: [Method] Method3 +# 19| 9: [Method] Method3 # 19| -1: [TypeMention] Void # 19| 4: [BlockStmt] {...} -# 20| 11: [Field] _backingField +# 20| 10: [Field] _backingField # 20| -1: [TypeMention] object -# 22| 12: [Property] PartialProperty1 +# 22| 11: [Property] PartialProperty1 # 9| -1: [TypeMention] object # 22| -1: [TypeMention] object # 24| 3: [Getter] get_PartialProperty1 @@ -36,10 +28,10 @@ Partial.cs: # 25| 0: [AssignExpr] ... = ... # 25| 0: [FieldAccess] access to field _backingField # 25| 1: [ParameterAccess] access to parameter value -# 27| 13: [Field] _backingArray +# 27| 12: [Field] _backingArray # 27| -1: [TypeMention] Object[] # 27| 1: [TypeMention] object -# 29| 14: [Indexer] Item +# 29| 13: [Indexer] Item # 11| -1: [TypeMention] object # 29| -1: [TypeMention] object #-----| 1: (Parameters) @@ -65,6 +57,16 @@ Partial.cs: # 32| -1: [FieldAccess] access to field _backingArray # 32| 0: [ParameterAccess] access to parameter index # 32| 1: [ParameterAccess] access to parameter value +# 36| 14: [Event] PartialEvent1 +# 13| -1: [TypeMention] EventHandler +# 36| 3: [AddEventAccessor] add_PartialEvent1 +#-----| 2: (Parameters) +# 36| 0: [Parameter] value +# 36| 4: [BlockStmt] {...} +# 36| 4: [RemoveEventAccessor] remove_PartialEvent1 +#-----| 2: (Parameters) +# 36| 0: [Parameter] value +# 36| 4: [BlockStmt] {...} # 39| [Class] OnePartPartialClass # 41| 6: [Method] PartialMethodWithoutBody2 # 41| -1: [TypeMention] Void