Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
22c45b2
refactor: ignore types with invalid accessibility
thomhurst Oct 24, 2025
0d9b5cc
refactor: ignore types with invalid accessibility
thomhurst Oct 24, 2025
e89a93a
fix: filter uniqueConversions to include only accessible types
thomhurst Oct 24, 2025
8df54af
refactor: extract type and assembly inclusion logic into separate met…
thomhurst Oct 24, 2025
1e11de4
refactor: simplify type inclusion checks by removing strong name requ…
thomhurst Oct 24, 2025
a005565
refactor: consolidate type scanning logic for test methods and parame…
thomhurst Oct 24, 2025
dba6200
feat: add scanning for data source attributes at method and class levels
thomhurst Oct 24, 2025
12b3196
refactor: enhance type accessibility checks and attribute scanning logic
thomhurst Oct 24, 2025
6f3c493
refactor: remove strong name requirement from type scanning logic
thomhurst Oct 25, 2025
57d91b4
refactor: simplify nullable type handling in AotConverterGenerator
thomhurst Oct 25, 2025
5877c2b
refactor: add attribute scanning for method and constructor parameter…
thomhurst Oct 25, 2025
2d593c3
refactor: add generic type parameter checks in AotConverterGenerator
thomhurst Oct 25, 2025
c5b5856
refactor: update Sourcy package versions and adjust project file conf…
thomhurst Oct 25, 2025
ad6a397
refactor: enhance AotConverterGenerator with cancellation support and…
thomhurst Oct 25, 2025
838adab
test: skip GeneratesCode test for investigation of CI vs local behavior
thomhurst Oct 25, 2025
5a76762
feat: add detailed stacktrace option to run configurations in Invokab…
thomhurst Oct 25, 2025
a9941b8
refactor: improve pattern matching handling in AotConverterGenerator …
thomhurst Oct 25, 2025
7fd330e
refactor: simplify type casting in AotConverterGenerator for improved…
thomhurst Oct 25, 2025
253423c
refactor: modify type conversion in AotConverterGenerator to ensure u…
thomhurst Oct 25, 2025
d145c7b
refactor: enhance type conversion handling in AotConverterGenerator a…
thomhurst Oct 25, 2025
968c2d4
feat: implement AOT converter registration in GlobalSetup and enhance…
thomhurst Oct 25, 2025
b5ed21d
refactor: change SetupAotConverters method to static in GlobalSetup f…
thomhurst Oct 25, 2025
7794b61
feat: add generic Register method and FuncAotConverter class for enha…
thomhurst Oct 25, 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

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions TUnit.Core.SourceGenerator.Tests/AotConverterGeneratorTests.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
using TUnit.Core.SourceGenerator.Tests.Options;

namespace TUnit.Core.SourceGenerator.Tests;

public class AotConverterGeneratorTests : TestsBase
{
[Test]
[Skip("Need to investigate - Behaves differently on local vs CI")]
public Task GeneratesCode() => AotConverterGenerator.RunTest(
Path.GetTempFileName(),
new RunTestOptions
{
AdditionalFiles = Sourcy.DotNet.Projects.TUnit_TestProject.Directory!.EnumerateFiles("*.cs", SearchOption.AllDirectories).Select(x => x.FullName).ToArray()
},
async generatedFiles =>
{
await Assert.That(generatedFiles.Length).IsGreaterThan(0);
});
}
1 change: 1 addition & 0 deletions TUnit.Core.SourceGenerator.Tests/TestsBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ protected TestsBase()
}

public TestsBase<TestMetadataGenerator> TestMetadataGenerator = new();
public TestsBase<AotConverterGenerator> AotConverterGenerator = new();
public TestsBase<HookMetadataGenerator> HooksGenerator = new();
public TestsBase<AssemblyLoaderGenerator> AssemblyLoaderGenerator = new();
public TestsBase<DisableReflectionScannerGenerator> DisableReflectionScannerGenerator = new();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ private static string EscapeForTestId(string str)
var needsEscape = false;
foreach (var c in str)
{
if (c == '\\' || c == '\r' || c == '\n' || c == '\t' || c == '"')
if (c is '\\' or '\r' or '\n' or '\t' or '"')
{
needsEscape = true;
break;
Expand Down
Loading
Loading