Skip to content

Commit ee46411

Browse files
committed
fix(TestMetadata): add suppress messages for AOT and trimming warnings
1 parent 26611d2 commit ee46411

3 files changed

+12
-0
lines changed

TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet10_0.verified.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,6 +1450,10 @@ namespace
14501450
where T : class
14511451
{
14521452
public TestMetadata() { }
1453+
[.("AOT", "IL3050", Justification="Source-generated tests provide strongly-typed factories that avoid reflection. Re" +
1454+
"flection paths are only used in fallback scenarios for dynamic test discovery.")]
1455+
[.("Trimming", "IL2072", Justification="TestMetadata uses DynamicallyAccessedMembers attributes to preserve required memb" +
1456+
"ers for test execution.")]
14531457
public override <.ExecutableTestCreationContext, .TestMetadata, .AbstractExecutableTest> CreateExecutableTestFactory { get; }
14541458
public new <[], object?[], T>? InstanceFactory { get; init; }
14551459
public <T, object?[], .CancellationToken, .>? InvokeTypedTest { get; init; }

TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet8_0.verified.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,6 +1450,10 @@ namespace
14501450
where T : class
14511451
{
14521452
public TestMetadata() { }
1453+
[.("AOT", "IL3050", Justification="Source-generated tests provide strongly-typed factories that avoid reflection. Re" +
1454+
"flection paths are only used in fallback scenarios for dynamic test discovery.")]
1455+
[.("Trimming", "IL2072", Justification="TestMetadata uses DynamicallyAccessedMembers attributes to preserve required memb" +
1456+
"ers for test execution.")]
14531457
public override <.ExecutableTestCreationContext, .TestMetadata, .AbstractExecutableTest> CreateExecutableTestFactory { get; }
14541458
public new <[], object?[], T>? InstanceFactory { get; init; }
14551459
public <T, object?[], .CancellationToken, .>? InvokeTypedTest { get; init; }

TUnit.PublicAPI/Tests.Core_Library_Has_No_API_Changes.DotNet9_0.verified.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1450,6 +1450,10 @@ namespace
14501450
where T : class
14511451
{
14521452
public TestMetadata() { }
1453+
[.("AOT", "IL3050", Justification="Source-generated tests provide strongly-typed factories that avoid reflection. Re" +
1454+
"flection paths are only used in fallback scenarios for dynamic test discovery.")]
1455+
[.("Trimming", "IL2072", Justification="TestMetadata uses DynamicallyAccessedMembers attributes to preserve required memb" +
1456+
"ers for test execution.")]
14531457
public override <.ExecutableTestCreationContext, .TestMetadata, .AbstractExecutableTest> CreateExecutableTestFactory { get; }
14541458
public new <[], object?[], T>? InstanceFactory { get; init; }
14551459
public <T, object?[], .CancellationToken, .>? InvokeTypedTest { get; init; }

0 commit comments

Comments
 (0)