1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

C# Add test suite for Diagnostic Analyzers: GlobalClass and MustBeVariant

This commit is contained in:
Alberto Vilches
2023-12-25 23:21:09 +01:00
parent 13a0d6e9b2
commit 7a90c56c00
12 changed files with 418 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
using Xunit;
namespace Godot.SourceGenerators.Tests;
public class GlobalClassAnalyzerTests
{
[Fact]
public async void GlobalClassMustDeriveFromGodotObjectTest()
{
const string GlobalClassGD0401 = "GlobalClass.GD0401.cs";
await CSharpAnalyzerVerifier<GlobalClassAnalyzer>.Verify(GlobalClassGD0401);
}
[Fact]
public async void GlobalClassMustNotBeGenericTest()
{
const string GlobalClassGD0402 = "GlobalClass.GD0402.cs";
await CSharpAnalyzerVerifier<GlobalClassAnalyzer>.Verify(GlobalClassGD0402);
}
}