Skip to content

Commit

Permalink
refactor: switch to an incremental source generator (#720)
Browse files Browse the repository at this point in the history
Use an [incremental source generator](https://github.com/dotnet/roslyn/blob/main/docs/features/incremental-generators.md) (see [here](https://andrewlock.net/creating-a-source-generator-part-1-creating-an-incremental-source-generator/)) for creating the test classes.

Replace inheritance with a marker attribute, so for the test classes you have to write
```csharp
[FileSystemTests]
public partial class Tests
{
    // your tests...
}
```
instead of
```csharp
public abstract partial class Tests<TFileSystem>
	: FileSystemTestBase<TFileSystem>
	where TFileSystem : IFileSystem
{
    // your tests...
}
```
  • Loading branch information
vbreuss authored Jan 14, 2025
1 parent b6f978e commit 5662239
Show file tree
Hide file tree
Showing 198 changed files with 1,128 additions and 1,605 deletions.
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</ItemGroup>
<ItemGroup>
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.12.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.3.4" />
<PackageVersion Include="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0" />
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="9.0.0" />
</ItemGroup>
<ItemGroup>
Expand Down

This file was deleted.

This file was deleted.

22 changes: 0 additions & 22 deletions Tests/Helpers/Testably.Abstractions.TestHelpers/TestBase.cs

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5662239

Please sign in to comment.