Skip to content

Commit 83cb2c2

Browse files
thomhurstclaude
andcommitted
fix: Update missed STAThread snapshot files with GeneratedCode attributes
The PR #4690 missed updating the STAThreadTests snapshot files when adding [ExcludeFromCodeCoverage] and [GeneratedCode] attributes to source generator output, causing the Windows CI pipeline to fail on snapshot verification. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 82d44dc commit 83cb2c2

4 files changed

Lines changed: 120 additions & 0 deletions

File tree

TUnit.Core.SourceGenerator.Tests/STAThreadTests.Test.DotNet10_0.verified.txt

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
#nullable enable
55
namespace TUnit.Generated;
6+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
7+
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
68
internal sealed class TUnit_TestProject_STAThreadTests_With_STA_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
79
{
810
public async global::System.Collections.Generic.IAsyncEnumerable<global::TUnit.Core.TestMetadata> GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
@@ -108,6 +110,8 @@ internal static class TUnit_TestProject_STAThreadTests_With_STA_ModuleInitialize
108110

109111
#nullable enable
110112
namespace TUnit.Generated;
113+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
114+
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
111115
internal sealed class TUnit_TestProject_STAThreadTests_Without_STA_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
112116
{
113117
public async global::System.Collections.Generic.IAsyncEnumerable<global::TUnit.Core.TestMetadata> GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
@@ -212,6 +216,8 @@ internal static class TUnit_TestProject_STAThreadTests_Without_STA_ModuleInitial
212216

213217
#nullable enable
214218
namespace TUnit.Generated;
219+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
220+
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
215221
internal sealed class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
216222
{
217223
public async global::System.Collections.Generic.IAsyncEnumerable<global::TUnit.Core.TestMetadata> GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
@@ -317,6 +323,8 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithSimpleAwait_Modul
317323

318324
#nullable enable
319325
namespace TUnit.Generated;
326+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
327+
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
320328
internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
321329
{
322330
public async global::System.Collections.Generic.IAsyncEnumerable<global::TUnit.Core.TestMetadata> GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
@@ -422,6 +430,8 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskYield_ModuleI
422430

423431
#nullable enable
424432
namespace TUnit.Generated;
433+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
434+
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
425435
internal sealed class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTrue_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
426436
{
427437
public async global::System.Collections.Generic.IAsyncEnumerable<global::TUnit.Core.TestMetadata> GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
@@ -527,6 +537,8 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithConfigureAwaitTru
527537

528538
#nullable enable
529539
namespace TUnit.Generated;
540+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
541+
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
530542
internal sealed class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
531543
{
532544
public async global::System.Collections.Generic.IAsyncEnumerable<global::TUnit.Core.TestMetadata> GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
@@ -632,6 +644,8 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithNestedAsyncCalls_
632644

633645
#nullable enable
634646
namespace TUnit.Generated;
647+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
648+
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
635649
internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
636650
{
637651
public async global::System.Collections.Generic.IAsyncEnumerable<global::TUnit.Core.TestMetadata> GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
@@ -737,6 +751,8 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskFromResult_Mo
737751

738752
#nullable enable
739753
namespace TUnit.Generated;
754+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
755+
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
740756
internal sealed class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
741757
{
742758
public async global::System.Collections.Generic.IAsyncEnumerable<global::TUnit.Core.TestMetadata> GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
@@ -842,6 +858,8 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithCompletedTask_Mod
842858

843859
#nullable enable
844860
namespace TUnit.Generated;
861+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
862+
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
845863
internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
846864
{
847865
public async global::System.Collections.Generic.IAsyncEnumerable<global::TUnit.Core.TestMetadata> GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
@@ -947,6 +965,8 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskRun_ModuleIni
947965

948966
#nullable enable
949967
namespace TUnit.Generated;
968+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
969+
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
950970
internal sealed class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
951971
{
952972
public async global::System.Collections.Generic.IAsyncEnumerable<global::TUnit.Core.TestMetadata> GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
@@ -1052,6 +1072,8 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithMultipleAwaits_Mo
10521072

10531073
#nullable enable
10541074
namespace TUnit.Generated;
1075+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
1076+
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
10551077
internal sealed class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
10561078
{
10571079
public async global::System.Collections.Generic.IAsyncEnumerable<global::TUnit.Core.TestMetadata> GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
@@ -1157,6 +1179,8 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithAsyncEnumerable_M
11571179

11581180
#nullable enable
11591181
namespace TUnit.Generated;
1182+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
1183+
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
11601184
internal sealed class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
11611185
{
11621186
public async global::System.Collections.Generic.IAsyncEnumerable<global::TUnit.Core.TestMetadata> GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
@@ -1262,6 +1286,8 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithTaskWhenAll_Modul
12621286

12631287
#nullable enable
12641288
namespace TUnit.Generated;
1289+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
1290+
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
12651291
internal sealed class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
12661292
{
12671293
public async global::System.Collections.Generic.IAsyncEnumerable<global::TUnit.Core.TestMetadata> GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
@@ -1367,6 +1393,8 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithExceptionHandling
13671393

13681394
#nullable enable
13691395
namespace TUnit.Generated;
1396+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
1397+
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
13701398
internal sealed class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAssertion_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
13711399
{
13721400
public async global::System.Collections.Generic.IAsyncEnumerable<global::TUnit.Core.TestMetadata> GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)
@@ -1472,6 +1500,8 @@ internal static class TUnit_TestProject_STAThreadTests_STA_WithThrowsNothingAsse
14721500

14731501
#nullable enable
14741502
namespace TUnit.Generated;
1503+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
1504+
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
14751505
internal sealed class TUnit_TestProject_STAThreadTests_STA_WithFuncAssertion_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
14761506
{
14771507
public async global::System.Collections.Generic.IAsyncEnumerable<global::TUnit.Core.TestMetadata> GetTestsAsync(string testSessionId, [global::System.Runtime.CompilerServices.EnumeratorCancellation] global::System.Threading.CancellationToken cancellationToken = default)

0 commit comments

Comments
 (0)