From 241a5990c6fc260c8e05894127d3b4664b8ab989 Mon Sep 17 00:00:00 2001 From: Flash0ver <38893694+Flash0ver@users.noreply.github.com> Date: Thu, 30 May 2024 21:14:30 +0200 Subject: [PATCH 1/2] test: add using static test cases --- .../Enumerations/EnumInterceptorGeneratorTests.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/source/tests/FlashOWare.Generators.Tests/Generators/Enumerations/EnumInterceptorGeneratorTests.cs b/source/tests/FlashOWare.Generators.Tests/Generators/Enumerations/EnumInterceptorGeneratorTests.cs index f939f8c..88833c8 100644 --- a/source/tests/FlashOWare.Generators.Tests/Generators/Enumerations/EnumInterceptorGeneratorTests.cs +++ b/source/tests/FlashOWare.Generators.Tests/Generators/Enumerations/EnumInterceptorGeneratorTests.cs @@ -107,6 +107,8 @@ public void Method(UriKind parameter1, UriFormat parameter2) _ = Enum.IsDefined(default(Enum2)); _ = Alias.GetName(UriKind.Absolute); _ = Alias.IsDefined(UriFormat.Unescaped); + _ = GetName(UriKind.Absolute); + _ = IsDefined(UriFormat.Unescaped); _ = Enum.GetName((UriKind)0); _ = Enum.IsDefined((UriFormat)0); _ = global::System.Enum.GetName(global::System.UriKind.Absolute); @@ -171,8 +173,9 @@ internal static bool IsDefined(global::System.StringSplitOptions value) [InterceptsLocation(@"/0/Test1.cs", 26, 12)] [InterceptsLocation(@"/0/Test1.cs", 28, 12)] [InterceptsLocation(@"/0/Test1.cs", 30, 13)] - [InterceptsLocation(@"/0/Test1.cs", 32, 12)] - [InterceptsLocation(@"/0/Test1.cs", 34, 27)] + [InterceptsLocation(@"/0/Test1.cs", 32, 07)] + [InterceptsLocation(@"/0/Test1.cs", 34, 12)] + [InterceptsLocation(@"/0/Test1.cs", 36, 27)] internal static string? GetName(global::System.UriKind value) { return value switch @@ -189,8 +192,9 @@ internal static bool IsDefined(global::System.StringSplitOptions value) [InterceptsLocation(@"/0/Test1.cs", 27, 12)] [InterceptsLocation(@"/0/Test1.cs", 29, 12)] [InterceptsLocation(@"/0/Test1.cs", 31, 13)] - [InterceptsLocation(@"/0/Test1.cs", 33, 12)] - [InterceptsLocation(@"/0/Test1.cs", 35, 27)] + [InterceptsLocation(@"/0/Test1.cs", 33, 07)] + [InterceptsLocation(@"/0/Test1.cs", 35, 12)] + [InterceptsLocation(@"/0/Test1.cs", 37, 27)] internal static bool IsDefined(global::System.UriFormat value) { return value is From eebbd5bc9d87f760eafd1a92718a232bd43cffdf Mon Sep 17 00:00:00 2001 From: Flash0ver <38893694+Flash0ver@users.noreply.github.com> Date: Thu, 30 May 2024 21:16:19 +0200 Subject: [PATCH 2/2] docs: add pre-release entry --- docs/CHANGELOG-Prerelease.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/CHANGELOG-Prerelease.md b/docs/CHANGELOG-Prerelease.md index f014ae3..b6f2d62 100644 --- a/docs/CHANGELOG-Prerelease.md +++ b/docs/CHANGELOG-Prerelease.md @@ -19,6 +19,7 @@ Prerelease Changelog - **Fixed** _ArgumentException_ in `Enum.IsDefined-Generator` when multiple _partial class type declarations_ have at least one `GeneratedEnumIsDefinedAttribute`. - **Fixed** `Enum.GetName-Generator` generating invalid C# source when the type argument of `GeneratedEnumGetNameAttribute` is not an _enum_ type. - **Fixed** `Enum.IsDefined-Generator` generating invalid C# source when the type argument of `GeneratedEnumIsDefinedAttribute` is not an _enum_ type. +- **Fixed** `Enum-Interceptor-Generator` not including _invocation expressions_ targeting the _Enum_ methods when a `using static` directive (C# 6) imports these static members. ### Package - **Added** documentation to `README.md`.