Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace TUnit.Generated;
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
{
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)
public global::System.Collections.Generic.IReadOnlyList<global::TUnit.Core.TestMetadata> GetTests(string testSessionId)
{
var metadata = new global::TUnit.Core.TestMetadata<global::TUnit.TestProject.AbstractTests.ConcreteClass1>
{
Expand Down Expand Up @@ -52,7 +52,7 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClass
return classMetadata;
})
},
InstanceFactory = (typeArgs, args) => new global::TUnit.TestProject.AbstractTests.ConcreteClass1(),
InstanceFactory = static (typeArgs, args) => new global::TUnit.TestProject.AbstractTests.ConcreteClass1(),
InvokeTypedTest = static (instance, args, cancellationToken) =>
{
try
Expand All @@ -66,8 +66,7 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClass
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
yield return metadata;
yield break;
return new global::TUnit.Core.TestMetadata[] { metadata };
}
public global::System.Collections.Generic.IEnumerable<global::TUnit.Core.TestDescriptor> EnumerateTestDescriptors()
{
Expand All @@ -84,7 +83,7 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClass
HasDataSource = false,
RepeatCount = 0,
DependsOn = global::System.Array.Empty<string>(),
Materializer = GetTestsAsync
Materializer = GetTests
};
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace TUnit.Generated;
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_SecondTest_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
{
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)
public global::System.Collections.Generic.IReadOnlyList<global::TUnit.Core.TestMetadata> GetTests(string testSessionId)
{
var metadata = new global::TUnit.Core.TestMetadata<global::TUnit.TestProject.AbstractTests.ConcreteClass2>
{
Expand Down Expand Up @@ -53,7 +53,7 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_SecondTest_
return classMetadata;
})
},
InstanceFactory = (typeArgs, args) => new global::TUnit.TestProject.AbstractTests.ConcreteClass2(),
InstanceFactory = static (typeArgs, args) => new global::TUnit.TestProject.AbstractTests.ConcreteClass2(),
InvokeTypedTest = static (instance, args, cancellationToken) =>
{
try
Expand All @@ -68,8 +68,7 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_SecondTest_
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
yield return metadata;
yield break;
return new global::TUnit.Core.TestMetadata[] { metadata };
}
public global::System.Collections.Generic.IEnumerable<global::TUnit.Core.TestDescriptor> EnumerateTestDescriptors()
{
Expand All @@ -86,7 +85,7 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_SecondTest_
HasDataSource = false,
RepeatCount = 0,
DependsOn = global::System.Array.Empty<string>(),
Materializer = GetTestsAsync
Materializer = GetTests
};
}
}
Expand All @@ -111,7 +110,7 @@ namespace TUnit.Generated;
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClassName_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
{
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)
public global::System.Collections.Generic.IReadOnlyList<global::TUnit.Core.TestMetadata> GetTests(string testSessionId)
{
var metadata = new global::TUnit.Core.TestMetadata<global::TUnit.TestProject.AbstractTests.ConcreteClass2>
{
Expand Down Expand Up @@ -157,7 +156,7 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClass
return classMetadata;
})
},
InstanceFactory = (typeArgs, args) => new global::TUnit.TestProject.AbstractTests.ConcreteClass2(),
InstanceFactory = static (typeArgs, args) => new global::TUnit.TestProject.AbstractTests.ConcreteClass2(),
InvokeTypedTest = static (instance, args, cancellationToken) =>
{
try
Expand All @@ -171,8 +170,7 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClass
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
yield return metadata;
yield break;
return new global::TUnit.Core.TestMetadata[] { metadata };
}
public global::System.Collections.Generic.IEnumerable<global::TUnit.Core.TestDescriptor> EnumerateTestDescriptors()
{
Expand All @@ -189,7 +187,7 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass2_AssertClass
HasDataSource = false,
RepeatCount = 0,
DependsOn = global::System.Array.Empty<string>(),
Materializer = GetTestsAsync
Materializer = GetTests
};
}
}
Expand All @@ -214,7 +212,7 @@ namespace TUnit.Generated;
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
{
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)
public global::System.Collections.Generic.IReadOnlyList<global::TUnit.Core.TestMetadata> GetTests(string testSessionId)
{
var metadata = new global::TUnit.Core.TestMetadata<global::TUnit.TestProject.AbstractTests.ConcreteClass1>
{
Expand Down Expand Up @@ -259,7 +257,7 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClass
return classMetadata;
})
},
InstanceFactory = (typeArgs, args) => new global::TUnit.TestProject.AbstractTests.ConcreteClass1(),
InstanceFactory = static (typeArgs, args) => new global::TUnit.TestProject.AbstractTests.ConcreteClass1(),
InvokeTypedTest = static (instance, args, cancellationToken) =>
{
try
Expand All @@ -273,8 +271,7 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClass
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
yield return metadata;
yield break;
return new global::TUnit.Core.TestMetadata[] { metadata };
}
public global::System.Collections.Generic.IEnumerable<global::TUnit.Core.TestDescriptor> EnumerateTestDescriptors()
{
Expand All @@ -291,7 +288,7 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClass
HasDataSource = false,
RepeatCount = 0,
DependsOn = global::System.Array.Empty<string>(),
Materializer = GetTestsAsync
Materializer = GetTests
};
}
}
Expand Down
18 changes: 8 additions & 10 deletions TUnit.Core.SourceGenerator.Tests/AfterAllTests.Test.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace TUnit.Generated;
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
{
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)
public global::System.Collections.Generic.IReadOnlyList<global::TUnit.Core.TestMetadata> GetTests(string testSessionId)
{
var metadata = new global::TUnit.Core.TestMetadata<global::TUnit.TestProject.AfterTests.CleanupTests>
{
Expand Down Expand Up @@ -51,7 +51,7 @@ internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test1_TestSource
return classMetadata;
})
},
InstanceFactory = (typeArgs, args) => new global::TUnit.TestProject.AfterTests.CleanupTests(),
InstanceFactory = static (typeArgs, args) => new global::TUnit.TestProject.AfterTests.CleanupTests(),
InvokeTypedTest = static (instance, args, cancellationToken) =>
{
try
Expand All @@ -65,8 +65,7 @@ internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test1_TestSource
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
yield return metadata;
yield break;
return new global::TUnit.Core.TestMetadata[] { metadata };
}
public global::System.Collections.Generic.IEnumerable<global::TUnit.Core.TestDescriptor> EnumerateTestDescriptors()
{
Expand All @@ -83,7 +82,7 @@ internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test1_TestSource
HasDataSource = false,
RepeatCount = 0,
DependsOn = global::System.Array.Empty<string>(),
Materializer = GetTestsAsync
Materializer = GetTests
};
}
}
Expand All @@ -108,7 +107,7 @@ namespace TUnit.Generated;
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test2_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
{
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)
public global::System.Collections.Generic.IReadOnlyList<global::TUnit.Core.TestMetadata> GetTests(string testSessionId)
{
var metadata = new global::TUnit.Core.TestMetadata<global::TUnit.TestProject.AfterTests.CleanupTests>
{
Expand Down Expand Up @@ -152,7 +151,7 @@ internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test2_TestSource
return classMetadata;
})
},
InstanceFactory = (typeArgs, args) => new global::TUnit.TestProject.AfterTests.CleanupTests(),
InstanceFactory = static (typeArgs, args) => new global::TUnit.TestProject.AfterTests.CleanupTests(),
InvokeTypedTest = static (instance, args, cancellationToken) =>
{
try
Expand All @@ -166,8 +165,7 @@ internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test2_TestSource
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
yield return metadata;
yield break;
return new global::TUnit.Core.TestMetadata[] { metadata };
}
public global::System.Collections.Generic.IEnumerable<global::TUnit.Core.TestDescriptor> EnumerateTestDescriptors()
{
Expand All @@ -184,7 +182,7 @@ internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test2_TestSource
HasDataSource = false,
RepeatCount = 0,
DependsOn = global::System.Array.Empty<string>(),
Materializer = GetTestsAsync
Materializer = GetTests
};
}
}
Expand Down
18 changes: 8 additions & 10 deletions TUnit.Core.SourceGenerator.Tests/AfterTests.Test.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace TUnit.Generated;
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test1_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
{
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)
public global::System.Collections.Generic.IReadOnlyList<global::TUnit.Core.TestMetadata> GetTests(string testSessionId)
{
var metadata = new global::TUnit.Core.TestMetadata<global::TUnit.TestProject.AfterTests.CleanupTests>
{
Expand Down Expand Up @@ -51,7 +51,7 @@ internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test1_TestSource
return classMetadata;
})
},
InstanceFactory = (typeArgs, args) => new global::TUnit.TestProject.AfterTests.CleanupTests(),
InstanceFactory = static (typeArgs, args) => new global::TUnit.TestProject.AfterTests.CleanupTests(),
InvokeTypedTest = static (instance, args, cancellationToken) =>
{
try
Expand All @@ -65,8 +65,7 @@ internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test1_TestSource
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
yield return metadata;
yield break;
return new global::TUnit.Core.TestMetadata[] { metadata };
}
public global::System.Collections.Generic.IEnumerable<global::TUnit.Core.TestDescriptor> EnumerateTestDescriptors()
{
Expand All @@ -83,7 +82,7 @@ internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test1_TestSource
HasDataSource = false,
RepeatCount = 0,
DependsOn = global::System.Array.Empty<string>(),
Materializer = GetTestsAsync
Materializer = GetTests
};
}
}
Expand All @@ -108,7 +107,7 @@ namespace TUnit.Generated;
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "1.0.0.0")]
internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test2_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
{
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)
public global::System.Collections.Generic.IReadOnlyList<global::TUnit.Core.TestMetadata> GetTests(string testSessionId)
{
var metadata = new global::TUnit.Core.TestMetadata<global::TUnit.TestProject.AfterTests.CleanupTests>
{
Expand Down Expand Up @@ -152,7 +151,7 @@ internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test2_TestSource
return classMetadata;
})
},
InstanceFactory = (typeArgs, args) => new global::TUnit.TestProject.AfterTests.CleanupTests(),
InstanceFactory = static (typeArgs, args) => new global::TUnit.TestProject.AfterTests.CleanupTests(),
InvokeTypedTest = static (instance, args, cancellationToken) =>
{
try
Expand All @@ -166,8 +165,7 @@ internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test2_TestSource
},
};
metadata.UseRuntimeDataGeneration(testSessionId);
yield return metadata;
yield break;
return new global::TUnit.Core.TestMetadata[] { metadata };
}
public global::System.Collections.Generic.IEnumerable<global::TUnit.Core.TestDescriptor> EnumerateTestDescriptors()
{
Expand All @@ -184,7 +182,7 @@ internal sealed class TUnit_TestProject_AfterTests_CleanupTests_Test2_TestSource
HasDataSource = false,
RepeatCount = 0,
DependsOn = global::System.Array.Empty<string>(),
Materializer = GetTestsAsync
Materializer = GetTests
};
}
}
Expand Down
Loading
Loading