Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
93cd430
perf: add startup performance measurement scripts
thomhurst Mar 22, 2026
cac3033
perf: replace per-test JIT methods with data-table registration and c…
thomhurst Mar 22, 2026
9403dcf
perf: replace Materialize/consolidated switches with self-contained T…
thomhurst Mar 22, 2026
56bd124
chore: remove orphaned old type files
thomhurst Mar 22, 2026
84eefb9
perf: consolidate InvokeBody/CreateAttributes into class-level switch…
thomhurst Mar 22, 2026
3e4ea68
fix: nested class name resolution, rename CustomProperties to Properties
thomhurst Mar 22, 2026
75f25d8
merge: resolve conflict with main's parallel CollectTests
thomhurst Mar 22, 2026
1009d2b
perf: convert generic tests from ITestSource to TestEntry
thomhurst Mar 22, 2026
2ee3b19
refactor: remove ITestSource collection path from engine
thomhurst Mar 22, 2026
7a444c6
fix: pass MethodDataSource attribute as specificAttr for generic type…
thomhurst Mar 22, 2026
4284e40
fix: inherited tests now emit TestEntry, proper instance creation for…
thomhurst Mar 22, 2026
73786a1
perf: cache PropertyDataSources/PropertyInjections arrays in TestEntry
thomhurst Mar 22, 2026
07daf86
refactor: remove dual-path coupling from TestMetadata<T>
thomhurst Mar 22, 2026
d15ab46
test: update source generator snapshot tests for TestEntry pattern
thomhurst Mar 22, 2026
6b6318b
test: update public API snapshots for new TestEntry types
thomhurst Mar 22, 2026
fa61c1b
fix: address claude-review items 2/4/5
thomhurst Mar 22, 2026
53997a0
perf: cache InvokeTypedTest and AttributeFactory closures in TestEntry
thomhurst Mar 22, 2026
b8440ba
refactor: remove all ITestSource/TestDescriptor legacy code paths
thomhurst Mar 22, 2026
b81a900
perf: inline MethodMetadata into static fields, eliminate __InitMetho…
thomhurst Mar 22, 2026
32bcdc5
test: update public API snapshots for inlined MethodMetadata
thomhurst Mar 23, 2026
aebf007
fix: address code review — thread-safe delegate caching, remove unuse…
thomhurst Mar 23, 2026
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
117 changes: 45 additions & 72 deletions TUnit.Core.SourceGenerator.Tests/AbstractTests.Concrete1.verified.txt
Original file line number Diff line number Diff line change
@@ -1,61 +1,52 @@
// <auto-generated/>
// <auto-generated/>
#pragma warning disable

#nullable enable
namespace TUnit.Generated;
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverageAttribute]
[global::System.CodeDom.Compiler.GeneratedCode("TUnit", "VERSION_SCRUBBED")]
internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource : global::TUnit.Core.Interfaces.SourceGenerator.ITestSource, global::TUnit.Core.Interfaces.SourceGenerator.ITestDescriptorSource
internal static class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource
{
public global::System.Collections.Generic.IReadOnlyList<global::TUnit.Core.TestMetadata> GetTests(string testSessionId)
private static readonly global::TUnit.Core.ClassMetadata __classMetadata = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AbstractTests.ConcreteClass1", new global::TUnit.Core.ClassMetadata
{
var metadata = new global::TUnit.Core.TestMetadata<global::TUnit.TestProject.AbstractTests.ConcreteClass1>
Type = typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass1),
TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass1)),
Name = "ConcreteClass1",
Namespace = "TUnit.TestProject.AbstractTests",
Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"),
Parameters = global::System.Array.Empty<global::TUnit.Core.ParameterMetadata>(),
Properties = global::System.Array.Empty<global::TUnit.Core.PropertyMetadata>(),
Parent = null
});
private static readonly global::System.Type __classType = typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass1);
private static readonly global::TUnit.Core.MethodMetadata __mm_0 = global::TUnit.Core.MethodMetadataFactory.Create("AssertClassName", __classType, typeof(global::System.Threading.Tasks.Task), __classMetadata);
private static global::TUnit.TestProject.AbstractTests.ConcreteClass1 __CreateInstance_0(global::System.Type[] typeArgs, object?[] args)
{
return new global::TUnit.TestProject.AbstractTests.ConcreteClass1();
}
private static global::System.Threading.Tasks.ValueTask __Invoke_0(global::TUnit.TestProject.AbstractTests.ConcreteClass1 instance, int methodIndex, object?[] args, global::System.Threading.CancellationToken cancellationToken)
{
try
{
TestName = "AssertClassName",
TestClassType = typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass1),
TestMethodName = "AssertClassName",
Dependencies = global::System.Array.Empty<global::TUnit.Core.TestDependency>(),
AttributeFactory = __CreateAttributes,
DataSources = global::System.Array.Empty<global::TUnit.Core.IDataSourceAttribute>(),
ClassDataSources = global::System.Array.Empty<global::TUnit.Core.IDataSourceAttribute>(),
PropertyDataSources = global::System.Array.Empty<global::TUnit.Core.PropertyDataSource>(),
PropertyInjections = global::System.Array.Empty<global::TUnit.Core.PropertyInjectionData>(),
InheritanceDepth = 1,
FilePath = @"",
LineNumber = 3,
MethodMetadata = new global::TUnit.Core.MethodMetadata
{
Type = typeof(global::TUnit.TestProject.AbstractTests.AbstractBaseClass),
TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AbstractTests.AbstractBaseClass)),
Name = "AssertClassName",
GenericTypeCount = 0,
ReturnType = typeof(global::System.Threading.Tasks.Task),
ReturnTypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::System.Threading.Tasks.Task)),
Parameters = global::System.Array.Empty<global::TUnit.Core.ParameterMetadata>(),
Class = global::TUnit.Core.ClassMetadata.GetOrAdd("TestsBase`1:global::TUnit.TestProject.AbstractTests.ConcreteClass1", new global::TUnit.Core.ClassMetadata
{
Type = typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass1),
TypeInfo = new global::TUnit.Core.ConcreteType(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass1)),
Name = "ConcreteClass1",
Namespace = "TUnit.TestProject.AbstractTests",
Assembly = global::TUnit.Core.AssemblyMetadata.GetOrAdd("TestsBase`1", "TestsBase`1"),
Parameters = global::System.Array.Empty<global::TUnit.Core.ParameterMetadata>(),
Properties = global::System.Array.Empty<global::TUnit.Core.PropertyMetadata>(),
Parent = null
})
},
InstanceFactory = __CreateInstance,
InvokeTypedTest = __InvokeTest,
return new global::System.Threading.Tasks.ValueTask(instance.AssertClassName());
}
catch (global::System.Exception ex)
{
return new global::System.Threading.Tasks.ValueTask(global::System.Threading.Tasks.Task.FromException(ex));
}
}
private static global::System.Attribute[] __Attributes_0(int groupIndex)
{
return new global::System.Attribute[]
{
new global::TUnit.Core.TestAttribute(),
new global::TUnit.Core.InheritsTestsAttribute()
};
metadata.UseRuntimeDataGeneration(testSessionId);
return new global::TUnit.Core.TestMetadata[] { metadata };
}
public global::System.Collections.Generic.IEnumerable<global::TUnit.Core.TestDescriptor> EnumerateTestDescriptors()
public static readonly global::TUnit.Core.TestEntry<global::TUnit.TestProject.AbstractTests.ConcreteClass1>[] Entries_0 = new global::TUnit.Core.TestEntry<global::TUnit.TestProject.AbstractTests.ConcreteClass1>[]
{
yield return new global::TUnit.Core.TestDescriptor
new global::TUnit.Core.TestEntry<global::TUnit.TestProject.AbstractTests.ConcreteClass1>
{
TestId = "TUnit.TestProject.AbstractTests.ConcreteClass1.AssertClassName",
ClassName = "ConcreteClass1",
MethodName = "AssertClassName",
FullyQualifiedName = "TUnit.TestProject.AbstractTests.ConcreteClass1.AssertClassName",
FilePath = @"",
Expand All @@ -65,34 +56,16 @@ internal sealed class TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClass
HasDataSource = false,
RepeatCount = 0,
DependsOn = global::System.Array.Empty<string>(),
Materializer = GetTests
};
}
private static global::System.Attribute[] __CreateAttributes()
{
return
[
new global::TUnit.Core.TestAttribute(),
new global::TUnit.Core.InheritsTestsAttribute()
];
}
private static global::TUnit.TestProject.AbstractTests.ConcreteClass1 __CreateInstance(global::System.Type[] typeArgs, object?[] args)
{
return new global::TUnit.TestProject.AbstractTests.ConcreteClass1();
}
private static global::System.Threading.Tasks.ValueTask __InvokeTest(global::TUnit.TestProject.AbstractTests.ConcreteClass1 instance, object?[] args, global::System.Threading.CancellationToken cancellationToken)
{
try
{
return new global::System.Threading.Tasks.ValueTask(instance.AssertClassName());
}
catch (global::System.Exception ex)
{
return new global::System.Threading.Tasks.ValueTask(global::System.Threading.Tasks.Task.FromException(ex));
}
}
MethodMetadata = __mm_0,
CreateInstance = __CreateInstance_0,
InvokeBody = __Invoke_0,
MethodIndex = 0,
CreateAttributes = __Attributes_0,
AttributeGroupIndex = 0,
},
};
}
internal static partial class TUnit_TestRegistration
{
static readonly int _r_TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource = global::TUnit.Core.SourceRegistrar.RegisterReturn(typeof(global::TUnit.TestProject.AbstractTests.ConcreteClass1), new TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource());
static readonly int _r_TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource_0 = global::TUnit.Core.SourceRegistrar.RegisterEntries(TUnit_TestProject_AbstractTests_ConcreteClass1_AssertClassName_TestSource.Entries_0);
}
Loading
Loading