Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
b7376e1
Refactor Engine tests for a speeder pipeline
thomhurst Jun 1, 2025
123c9a4
Whoops
thomhurst Jun 1, 2025
67259ad
Update snaps
thomhurst Jun 1, 2025
77c9758
Print command
thomhurst Jun 1, 2025
85e4958
Fix
thomhurst Jun 1, 2025
e30004f
Fix
thomhurst Jun 1, 2025
294e843
WIP
thomhurst Jun 1, 2025
2c508be
Merge branch 'main' into feature/refactor-engine-tests
thomhurst Jun 2, 2025
8912536
Refactor Context objects
thomhurst Jun 2, 2025
f93f9e7
WIP
thomhurst Jun 2, 2025
40cdde8
WIP
thomhurst Jun 2, 2025
2ff72b0
WIP
thomhurst Jun 2, 2025
7258a0e
WIP
thomhurst Jun 2, 2025
1789357
Fixes
thomhurst Jun 2, 2025
9bf7157
Fixes
thomhurst Jun 2, 2025
b834e87
Fix
thomhurst Jun 2, 2025
a8d2b82
Fix
thomhurst Jun 2, 2025
a38c903
Fixes
thomhurst Jun 2, 2025
4095c5b
Fixes
thomhurst Jun 2, 2025
24f9153
Fixes
thomhurst Jun 2, 2025
b9bf46e
Fixes
thomhurst Jun 2, 2025
b7de66a
Fixes
thomhurst Jun 2, 2025
6873dd0
Fixes
thomhurst Jun 2, 2025
3deda82
Tweak
thomhurst Jun 2, 2025
a3b9110
Update WindowsOnlyAttribute.cs
thomhurst Jun 2, 2025
f1adb6d
Update snaps
thomhurst Jun 3, 2025
e9218e4
Merge branch 'main' into feature/refactor-contexts
thomhurst Jun 3, 2025
00ac473
WIP
thomhurst Jun 3, 2025
39caf82
Fix nested class data sources
thomhurst Jun 3, 2025
2dd5765
WIP
thomhurst Jun 3, 2025
b1c6283
WIP
thomhurst Jun 3, 2025
04e35e3
WIP
thomhurst Jun 3, 2025
c99ac96
WIP
thomhurst Jun 3, 2025
0065881
WIP
thomhurst Jun 3, 2025
d19de4d
WIP
thomhurst Jun 3, 2025
11cf56d
WIP
thomhurst Jun 3, 2025
8d9ad0d
Fixes
thomhurst Jun 3, 2025
72f5d6e
Fix ReturnValue tests
thomhurst Jun 4, 2025
c03b98a
WIP
thomhurst Jun 4, 2025
2408581
Fixes
thomhurst Jun 4, 2025
f0f88a1
Fix
thomhurst Jun 4, 2025
369b1b5
Fixes
thomhurst Jun 4, 2025
a68c67a
WIP
thomhurst Jun 4, 2025
f97cce7
Fix
thomhurst Jun 4, 2025
493d784
Fixes
thomhurst Jun 4, 2025
b8af095
Fixes
thomhurst Jun 4, 2025
09df420
Fixes
thomhurst Jun 4, 2025
72dfc6a
Fixes
thomhurst Jun 4, 2025
700a9d1
Fixes
thomhurst Jun 4, 2025
b306566
WIP
thomhurst Jun 4, 2025
7f1f8fd
Fixes
thomhurst Jun 4, 2025
fcaaea0
Merge branch 'main' into feature/refactor-contexts
thomhurst Jun 4, 2025
5011e5e
Fixes
thomhurst Jun 4, 2025
fd5f46f
WIP
thomhurst Jun 4, 2025
e353d1c
if statement
thomhurst Jun 4, 2025
c5a5513
PropertyInitializationGenerator
thomhurst Jun 4, 2025
ddbafa1
Fixes
thomhurst Jun 4, 2025
c26f501
Add common interface method for IDataSourceGeneratorAttribute.cs
thomhurst Jun 4, 2025
80a81e9
Fix?
thomhurst Jun 5, 2025
56f413c
Fix
thomhurst Jun 5, 2025
7b8d7d5
Fixes
thomhurst Jun 5, 2025
0c937a8
Update snaps
thomhurst Jun 5, 2025
a1cdb5a
Remove debug line
thomhurst Jun 5, 2025
fba974c
Remove logs
thomhurst Jun 5, 2025
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
4 changes: 2 additions & 2 deletions TUnit.Core.SourceGenerator.Tests/Basic.Test.verified.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ file partial class Basic : global::TUnit.Core.Interfaces.SourceGenerator.IDynami
{
try
{
var context = new global::TUnit.Core.DynamicTestBuilderContext(@"", 40);
var context = new global::TUnit.Core.DynamicTestBuilderContext(@"", 43);
new global::TUnit.TestProject.DynamicTests.Basic().BuildTests(context);
return context.Tests;
}
Expand All @@ -35,7 +35,7 @@ file partial class Basic : global::TUnit.Core.Interfaces.SourceGenerator.IDynami
MethodName = $"BuildTests",
Exception = new TUnit.Core.Exceptions.TestFailedInitializationException("Basic.BuildTests failed to initialize", exception),
TestFilePath = @"",
TestLineNumber = 40,
TestLineNumber = 43,
}
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
}),
Name = "ClassDataSourceDrivenTests",
Namespace = "TUnit.TestProject",
Attributes = [],
Attributes =
[
new EngineTest(Pass)
],
Parameters = [],
Properties = [],
}),
Expand Down Expand Up @@ -115,7 +118,7 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
ResettableClassFactory = resettableClassFactory,
TestMethodFactory = (classInstance, cancellationToken) => AsyncConvert.Convert(() => classInstance.DataSource_Class(methodArgGeneratedData)),
TestFilePath = @"",
TestLineNumber = 9,
TestLineNumber = 11,
TestMethod = testInformation,
TestBuilderContext = testBuilderContext,
});
Expand All @@ -132,7 +135,7 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
MethodName = $"DataSource_Class",
Exception = new TUnit.Core.Exceptions.TestFailedInitializationException("ClassDataSourceDrivenTests.DataSource_Class failed to initialize", exception),
TestFilePath = @"",
TestLineNumber = 9,
TestLineNumber = 11,
});
}
return nodes;
Expand Down Expand Up @@ -198,7 +201,10 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
}),
Name = "ClassDataSourceDrivenTests",
Namespace = "TUnit.TestProject",
Attributes = [],
Attributes =
[
new EngineTest(Pass)
],
Parameters = [],
Properties = [],
}),
Expand Down Expand Up @@ -256,7 +262,7 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
ResettableClassFactory = resettableClassFactory,
TestMethodFactory = (classInstance, cancellationToken) => AsyncConvert.Convert(() => classInstance.DataSource_Class_Generic(methodArgGeneratedData)),
TestFilePath = @"",
TestLineNumber = 16,
TestLineNumber = 18,
TestMethod = testInformation,
TestBuilderContext = testBuilderContext,
});
Expand All @@ -273,7 +279,7 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
MethodName = $"DataSource_Class_Generic",
Exception = new TUnit.Core.Exceptions.TestFailedInitializationException("ClassDataSourceDrivenTests.DataSource_Class_Generic failed to initialize", exception),
TestFilePath = @"",
TestLineNumber = 16,
TestLineNumber = 18,
});
}
return nodes;
Expand Down Expand Up @@ -339,7 +345,10 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
}),
Name = "ClassDataSourceDrivenTests",
Namespace = "TUnit.TestProject",
Attributes = [],
Attributes =
[
new EngineTest(Pass)
],
Parameters = [],
Properties = [],
}),
Expand Down Expand Up @@ -397,7 +406,7 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
ResettableClassFactory = resettableClassFactory,
TestMethodFactory = (classInstance, cancellationToken) => AsyncConvert.Convert(() => classInstance.IsInitialized_With_1_ClassDataSource(methodArgGeneratedData)),
TestFilePath = @"",
TestLineNumber = 23,
TestLineNumber = 25,
TestMethod = testInformation,
TestBuilderContext = testBuilderContext,
});
Expand All @@ -414,7 +423,7 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
MethodName = $"IsInitialized_With_1_ClassDataSource",
Exception = new TUnit.Core.Exceptions.TestFailedInitializationException("ClassDataSourceDrivenTests.IsInitialized_With_1_ClassDataSource failed to initialize", exception),
TestFilePath = @"",
TestLineNumber = 23,
TestLineNumber = 25,
});
}
return nodes;
Expand Down Expand Up @@ -485,7 +494,10 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
}),
Name = "ClassDataSourceDrivenTests",
Namespace = "TUnit.TestProject",
Attributes = [],
Attributes =
[
new EngineTest(Pass)
],
Parameters = [],
Properties = [],
}),
Expand Down Expand Up @@ -551,7 +563,7 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
ResettableClassFactory = resettableClassFactory,
TestMethodFactory = (classInstance, cancellationToken) => AsyncConvert.Convert(() => classInstance.IsInitialized_With_2_ClassDataSources(methodArg, methodArg1)),
TestFilePath = @"",
TestLineNumber = 30,
TestLineNumber = 32,
TestMethod = testInformation,
TestBuilderContext = testBuilderContext,
});
Expand All @@ -568,7 +580,7 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
MethodName = $"IsInitialized_With_2_ClassDataSources",
Exception = new TUnit.Core.Exceptions.TestFailedInitializationException("ClassDataSourceDrivenTests.IsInitialized_With_2_ClassDataSources failed to initialize", exception),
TestFilePath = @"",
TestLineNumber = 30,
TestLineNumber = 32,
});
}
return nodes;
Expand Down Expand Up @@ -644,7 +656,10 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
}),
Name = "ClassDataSourceDrivenTests",
Namespace = "TUnit.TestProject",
Attributes = [],
Attributes =
[
new EngineTest(Pass)
],
Parameters = [],
Properties = [],
}),
Expand Down Expand Up @@ -716,7 +731,7 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
ResettableClassFactory = resettableClassFactory,
TestMethodFactory = (classInstance, cancellationToken) => AsyncConvert.Convert(() => classInstance.IsInitialized_With_3_ClassDataSources(methodArg, methodArg1, methodArg2)),
TestFilePath = @"",
TestLineNumber = 38,
TestLineNumber = 40,
TestMethod = testInformation,
TestBuilderContext = testBuilderContext,
});
Expand All @@ -733,7 +748,7 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
MethodName = $"IsInitialized_With_3_ClassDataSources",
Exception = new TUnit.Core.Exceptions.TestFailedInitializationException("ClassDataSourceDrivenTests.IsInitialized_With_3_ClassDataSources failed to initialize", exception),
TestFilePath = @"",
TestLineNumber = 38,
TestLineNumber = 40,
});
}
return nodes;
Expand Down Expand Up @@ -814,7 +829,10 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
}),
Name = "ClassDataSourceDrivenTests",
Namespace = "TUnit.TestProject",
Attributes = [],
Attributes =
[
new EngineTest(Pass)
],
Parameters = [],
Properties = [],
}),
Expand Down Expand Up @@ -892,7 +910,7 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
ResettableClassFactory = resettableClassFactory,
TestMethodFactory = (classInstance, cancellationToken) => AsyncConvert.Convert(() => classInstance.IsInitialized_With_4_ClassDataSources(methodArg, methodArg1, methodArg2, methodArg3)),
TestFilePath = @"",
TestLineNumber = 47,
TestLineNumber = 49,
TestMethod = testInformation,
TestBuilderContext = testBuilderContext,
});
Expand All @@ -909,7 +927,7 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
MethodName = $"IsInitialized_With_4_ClassDataSources",
Exception = new TUnit.Core.Exceptions.TestFailedInitializationException("ClassDataSourceDrivenTests.IsInitialized_With_4_ClassDataSources failed to initialize", exception),
TestFilePath = @"",
TestLineNumber = 47,
TestLineNumber = 49,
});
}
return nodes;
Expand Down Expand Up @@ -995,7 +1013,10 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
}),
Name = "ClassDataSourceDrivenTests",
Namespace = "TUnit.TestProject",
Attributes = [],
Attributes =
[
new EngineTest(Pass)
],
Parameters = [],
Properties = [],
}),
Expand Down Expand Up @@ -1079,7 +1100,7 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
ResettableClassFactory = resettableClassFactory,
TestMethodFactory = (classInstance, cancellationToken) => AsyncConvert.Convert(() => classInstance.IsInitialized_With_5_ClassDataSources(methodArg, methodArg1, methodArg2, methodArg3, methodArg4)),
TestFilePath = @"",
TestLineNumber = 57,
TestLineNumber = 59,
TestMethod = testInformation,
TestBuilderContext = testBuilderContext,
});
Expand All @@ -1096,7 +1117,7 @@ file partial class ClassDataSourceDrivenTests : global::TUnit.Core.Interfaces.So
MethodName = $"IsInitialized_With_5_ClassDataSources",
Exception = new TUnit.Core.Exceptions.TestFailedInitializationException("ClassDataSourceDrivenTests.IsInitialized_With_5_ClassDataSources failed to initialize", exception),
TestFilePath = @"",
TestLineNumber = 57,
TestLineNumber = 59,
});
}
return nodes;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ file partial class ClassDataSourceDrivenTests2 : global::TUnit.Core.Interfaces.S
}),
Name = "ClassDataSourceDrivenTests2",
Namespace = "TUnit.TestProject",
Attributes = [],
Attributes =
[
new EngineTest(Pass)
],
Parameters =
[
new global::TUnit.Core.SourceGeneratedParameterInformation<global::TUnit.TestProject.ClassDataSourceDrivenTests2.Base>
Expand Down Expand Up @@ -119,7 +122,7 @@ file partial class ClassDataSourceDrivenTests2 : global::TUnit.Core.Interfaces.S
ResettableClassFactory = resettableClassFactory,
TestMethodFactory = (classInstance, cancellationToken) => AsyncConvert.Convert(() => classInstance.Base_Derived1()),
TestFilePath = @"",
TestLineNumber = 9,
TestLineNumber = 12,
TestMethod = testInformation,
TestBuilderContext = testBuilderContext,
});
Expand All @@ -136,7 +139,7 @@ file partial class ClassDataSourceDrivenTests2 : global::TUnit.Core.Interfaces.S
MethodName = $"Base_Derived1",
Exception = new TUnit.Core.Exceptions.TestFailedInitializationException("ClassDataSourceDrivenTests2.Base_Derived1 failed to initialize", exception),
TestFilePath = @"",
TestLineNumber = 9,
TestLineNumber = 12,
});
}
return nodes;
Expand Down Expand Up @@ -170,7 +173,10 @@ file partial class ClassDataSourceDrivenTests2 : global::TUnit.Core.Interfaces.S
}),
Name = "ClassDataSourceDrivenTests2",
Namespace = "TUnit.TestProject",
Attributes = [],
Attributes =
[
new EngineTest(Pass)
],
Parameters =
[
new global::TUnit.Core.SourceGeneratedParameterInformation<global::TUnit.TestProject.ClassDataSourceDrivenTests2.Base>
Expand Down Expand Up @@ -235,7 +241,7 @@ file partial class ClassDataSourceDrivenTests2 : global::TUnit.Core.Interfaces.S
ResettableClassFactory = resettableClassFactory,
TestMethodFactory = (classInstance, cancellationToken) => AsyncConvert.Convert(() => classInstance.Base_Derived1()),
TestFilePath = @"",
TestLineNumber = 9,
TestLineNumber = 12,
TestMethod = testInformation,
TestBuilderContext = testBuilderContext,
});
Expand All @@ -252,7 +258,7 @@ file partial class ClassDataSourceDrivenTests2 : global::TUnit.Core.Interfaces.S
MethodName = $"Base_Derived1",
Exception = new TUnit.Core.Exceptions.TestFailedInitializationException("ClassDataSourceDrivenTests2.Base_Derived1 failed to initialize", exception),
TestFilePath = @"",
TestLineNumber = 9,
TestLineNumber = 12,
});
}
return nodes;
Expand Down Expand Up @@ -315,7 +321,10 @@ file partial class ClassDataSourceDrivenTests2 : global::TUnit.Core.Interfaces.S
}),
Name = "ClassDataSourceDrivenTests2",
Namespace = "TUnit.TestProject",
Attributes = [],
Attributes =
[
new EngineTest(Pass)
],
Parameters =
[
new global::TUnit.Core.SourceGeneratedParameterInformation<global::TUnit.TestProject.ClassDataSourceDrivenTests2.Base>
Expand Down Expand Up @@ -380,7 +389,7 @@ file partial class ClassDataSourceDrivenTests2 : global::TUnit.Core.Interfaces.S
ResettableClassFactory = resettableClassFactory,
TestMethodFactory = (classInstance, cancellationToken) => AsyncConvert.Convert(() => classInstance.Base_Derived2()),
TestFilePath = @"",
TestLineNumber = 15,
TestLineNumber = 18,
TestMethod = testInformation,
TestBuilderContext = testBuilderContext,
});
Expand All @@ -397,7 +406,7 @@ file partial class ClassDataSourceDrivenTests2 : global::TUnit.Core.Interfaces.S
MethodName = $"Base_Derived2",
Exception = new TUnit.Core.Exceptions.TestFailedInitializationException("ClassDataSourceDrivenTests2.Base_Derived2 failed to initialize", exception),
TestFilePath = @"",
TestLineNumber = 15,
TestLineNumber = 18,
});
}
return nodes;
Expand Down Expand Up @@ -431,7 +440,10 @@ file partial class ClassDataSourceDrivenTests2 : global::TUnit.Core.Interfaces.S
}),
Name = "ClassDataSourceDrivenTests2",
Namespace = "TUnit.TestProject",
Attributes = [],
Attributes =
[
new EngineTest(Pass)
],
Parameters =
[
new global::TUnit.Core.SourceGeneratedParameterInformation<global::TUnit.TestProject.ClassDataSourceDrivenTests2.Base>
Expand Down Expand Up @@ -496,7 +508,7 @@ file partial class ClassDataSourceDrivenTests2 : global::TUnit.Core.Interfaces.S
ResettableClassFactory = resettableClassFactory,
TestMethodFactory = (classInstance, cancellationToken) => AsyncConvert.Convert(() => classInstance.Base_Derived2()),
TestFilePath = @"",
TestLineNumber = 15,
TestLineNumber = 18,
TestMethod = testInformation,
TestBuilderContext = testBuilderContext,
});
Expand All @@ -513,7 +525,7 @@ file partial class ClassDataSourceDrivenTests2 : global::TUnit.Core.Interfaces.S
MethodName = $"Base_Derived2",
Exception = new TUnit.Core.Exceptions.TestFailedInitializationException("ClassDataSourceDrivenTests2.Base_Derived2 failed to initialize", exception),
TestFilePath = @"",
TestLineNumber = 15,
TestLineNumber = 18,
});
}
return nodes;
Expand Down
Loading
Loading