From c6e936f2c3d19771a6983020ca3ed1108ad67a3c Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Tue, 26 Nov 2024 09:28:54 +0100 Subject: [PATCH] C#: Update generics test and expected output from other tests. --- .../assemblies/compilation.expected | 8 +++---- .../format/StringFormatItemParameter.expected | 8 +++++++ .../test/library-tests/generics/Generics.ql | 1 + .../ApplicationModeEndpoints.expected | 24 +++++++++---------- 4 files changed, 25 insertions(+), 16 deletions(-) diff --git a/csharp/ql/test/library-tests/assemblies/compilation.expected b/csharp/ql/test/library-tests/assemblies/compilation.expected index 0119bd5edeee..ee9126f59cee 100644 --- a/csharp/ql/test/library-tests/assemblies/compilation.expected +++ b/csharp/ql/test/library-tests/assemblies/compilation.expected @@ -1,9 +1,9 @@ | Assembly1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | no compilation | | Locations, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null | has compilation | | System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | no compilation | -| System.Console, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | no compilation | +| System.Console, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | no compilation | | System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | no compilation | -| System.Private.CoreLib, Version=8.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e | no compilation | -| System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | no compilation | -| System.Runtime.Extensions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | no compilation | +| System.Private.CoreLib, Version=9.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e | no compilation | +| System.Runtime, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | no compilation | +| System.Runtime.Extensions, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | no compilation | | mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | no compilation | diff --git a/csharp/ql/test/library-tests/frameworks/format/StringFormatItemParameter.expected b/csharp/ql/test/library-tests/frameworks/format/StringFormatItemParameter.expected index 85e2d82f3ab2..978e1340492e 100644 --- a/csharp/ql/test/library-tests/frameworks/format/StringFormatItemParameter.expected +++ b/csharp/ql/test/library-tests/frameworks/format/StringFormatItemParameter.expected @@ -1,3 +1,4 @@ +| Console | Write(string, ReadOnlySpan) | arg | | Console | Write(string, object) | arg0 | | Console | Write(string, object, object) | arg0 | | Console | Write(string, object, object) | arg1 | @@ -5,6 +6,7 @@ | Console | Write(string, object, object, object) | arg1 | | Console | Write(string, object, object, object) | arg2 | | Console | Write(string, params Object[]) | arg | +| Console | WriteLine(string, ReadOnlySpan) | arg | | Console | WriteLine(string, object) | arg0 | | Console | WriteLine(string, object, object) | arg0 | | Console | WriteLine(string, object, object) | arg1 | @@ -15,6 +17,7 @@ | Debug | Assert(bool, string, string, params Object[]) | args | | Debug | Print(string, params Object[]) | args | | Debug | WriteLine(string, params Object[]) | args | +| StringBuilder | AppendFormat(IFormatProvider, string, ReadOnlySpan) | args | | StringBuilder | AppendFormat(IFormatProvider, string, object) | arg0 | | StringBuilder | AppendFormat(IFormatProvider, string, object, object) | arg0 | | StringBuilder | AppendFormat(IFormatProvider, string, object, object) | arg1 | @@ -22,6 +25,7 @@ | StringBuilder | AppendFormat(IFormatProvider, string, object, object, object) | arg1 | | StringBuilder | AppendFormat(IFormatProvider, string, object, object, object) | arg2 | | StringBuilder | AppendFormat(IFormatProvider, string, params Object[]) | args | +| StringBuilder | AppendFormat(string, ReadOnlySpan) | args | | StringBuilder | AppendFormat(string, object) | arg0 | | StringBuilder | AppendFormat(string, object, object) | arg0 | | StringBuilder | AppendFormat(string, object, object) | arg1 | @@ -30,6 +34,7 @@ | StringBuilder | AppendFormat(string, object, object, object) | arg2 | | StringBuilder | AppendFormat(string, params Object[]) | args | | Strings | MyStringFormat(string, params Object[]) | args | +| TextWriter | Write(string, ReadOnlySpan) | arg | | TextWriter | Write(string, object) | arg0 | | TextWriter | Write(string, object, object) | arg0 | | TextWriter | Write(string, object, object) | arg1 | @@ -37,6 +42,7 @@ | TextWriter | Write(string, object, object, object) | arg1 | | TextWriter | Write(string, object, object, object) | arg2 | | TextWriter | Write(string, params Object[]) | arg | +| TextWriter | WriteLine(string, ReadOnlySpan) | arg | | TextWriter | WriteLine(string, object) | arg0 | | TextWriter | WriteLine(string, object, object) | arg0 | | TextWriter | WriteLine(string, object, object) | arg1 | @@ -44,6 +50,7 @@ | TextWriter | WriteLine(string, object, object, object) | arg1 | | TextWriter | WriteLine(string, object, object, object) | arg2 | | TextWriter | WriteLine(string, params Object[]) | arg | +| string | Format(IFormatProvider, string, ReadOnlySpan) | args | | string | Format(IFormatProvider, string, object) | arg0 | | string | Format(IFormatProvider, string, object, object) | arg0 | | string | Format(IFormatProvider, string, object, object) | arg1 | @@ -51,6 +58,7 @@ | string | Format(IFormatProvider, string, object, object, object) | arg1 | | string | Format(IFormatProvider, string, object, object, object) | arg2 | | string | Format(IFormatProvider, string, params Object[]) | args | +| string | Format(string, ReadOnlySpan) | args | | string | Format(string, object) | arg0 | | string | Format(string, object, object) | arg0 | | string | Format(string, object, object) | arg1 | diff --git a/csharp/ql/test/library-tests/generics/Generics.ql b/csharp/ql/test/library-tests/generics/Generics.ql index e75f1fdc9088..ab1f0af982a8 100644 --- a/csharp/ql/test/library-tests/generics/Generics.ql +++ b/csharp/ql/test/library-tests/generics/Generics.ql @@ -223,6 +223,7 @@ query predicate test26(ConstructedGeneric cg, string s) { } query predicate test27(ConstructedType ct, UnboundGenericType ugt, UnboundGenericType sourceDecl) { + ct.fromSource() and ct instanceof NestedType and ugt = ct.getUnboundGeneric() and sourceDecl = ct.getUnboundDeclaration() and diff --git a/csharp/ql/test/utils/modeleditor/ApplicationModeEndpoints.expected b/csharp/ql/test/utils/modeleditor/ApplicationModeEndpoints.expected index 6e0758ca8095..7dcf3b4f8774 100644 --- a/csharp/ql/test/utils/modeleditor/ApplicationModeEndpoints.expected +++ b/csharp/ql/test/utils/modeleditor/ApplicationModeEndpoints.expected @@ -1,12 +1,12 @@ -| NonPublicClass.cs:9:9:9:31 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source | -| PublicClass.cs:9:9:9:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source | -| PublicClass.cs:14:9:14:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source | -| PublicClass.cs:19:9:19:51 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source | -| PublicClass.cs:19:33:19:50 | call to method ReadLine | System | Console | ReadLine | () | true | System.Console | 8.0.0.0 | neutral | source | -| PublicClass.cs:19:33:19:50 | call to method ReadLine | System | Console | ReadLine | () | true | System.Console | 8.0.0.0 | source | source | -| PublicClass.cs:24:9:24:46 | call to method Write | System | Console | Write | (System.Object) | true | System.Console | 8.0.0.0 | neutral | source | -| PublicClass.cs:30:9:30:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source | -| PublicGenericClass.cs:9:9:9:30 | call to method WriteLine | System | Console | WriteLine | (System.Object) | true | System.Console | 8.0.0.0 | neutral | source | -| PublicGenericClass.cs:14:9:14:30 | call to method WriteLine | System | Console | WriteLine | (System.Object) | true | System.Console | 8.0.0.0 | neutral | source | -| PublicGenericInterface.cs:13:9:13:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source | -| PublicInterface.cs:13:9:13:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 8.0.0.0 | neutral | source | +| NonPublicClass.cs:9:9:9:31 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source | +| PublicClass.cs:9:9:9:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source | +| PublicClass.cs:14:9:14:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source | +| PublicClass.cs:19:9:19:51 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source | +| PublicClass.cs:19:33:19:50 | call to method ReadLine | System | Console | ReadLine | () | true | System.Console | 9.0.0.0 | neutral | source | +| PublicClass.cs:19:33:19:50 | call to method ReadLine | System | Console | ReadLine | () | true | System.Console | 9.0.0.0 | source | source | +| PublicClass.cs:24:9:24:46 | call to method Write | System | Console | Write | (System.Object) | true | System.Console | 9.0.0.0 | neutral | source | +| PublicClass.cs:30:9:30:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source | +| PublicGenericClass.cs:9:9:9:30 | call to method WriteLine | System | Console | WriteLine | (System.Object) | true | System.Console | 9.0.0.0 | neutral | source | +| PublicGenericClass.cs:14:9:14:30 | call to method WriteLine | System | Console | WriteLine | (System.Object) | true | System.Console | 9.0.0.0 | neutral | source | +| PublicGenericInterface.cs:13:9:13:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source | +| PublicInterface.cs:13:9:13:30 | call to method WriteLine | System | Console | WriteLine | (System.String) | true | System.Console | 9.0.0.0 | neutral | source |