summaryrefslogtreecommitdiffstats
path: root/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Generic.cs
diff options
context:
space:
mode:
authorPaul Joannon <hello@pauljoannon.com>2023-10-07 12:36:28 +0200
committerPaul Joannon <hello@pauljoannon.com>2023-12-19 18:26:52 +0100
commitb352bdc8cbd241bc0268fa55f2374d913eef00d7 (patch)
tree3a947aa0326852d15b5db67ca68b61816eef0d12 /modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Generic.cs
parenta574c0296b38d5f786f249b12e6251e562c528cc (diff)
downloadredot-engine-b352bdc8cbd241bc0268fa55f2374d913eef00d7.tar.gz
Add tests for source generators
- Bootstrap xUnit project to test source generators - Implement source generator tests - Better tests structure (put test data in cs files) - Enable `ScriptSerializationGeneratorTests` - Enable `ScriptPathAttributeGeneratorTests` - Fix `NesterClass` -> `NestedClass` - Use `Path.Combine` when dealing with paths - Copy test data to the output directory
Diffstat (limited to 'modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Generic.cs')
-rw-r--r--modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Generic.cs18
1 files changed, 18 insertions, 0 deletions
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Generic.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Generic.cs
new file mode 100644
index 0000000000..84d1ede065
--- /dev/null
+++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators.Tests/TestData/Sources/Generic.cs
@@ -0,0 +1,18 @@
+using Godot;
+
+partial class Generic<T> : GodotObject
+{
+ private int _field;
+}
+
+// Generic again but different generic parameters
+partial class Generic<T, R> : GodotObject
+{
+ private int _field;
+}
+
+// Generic again but without generic parameters
+partial class Generic : GodotObject
+{
+ private int _field;
+}