You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm working on optimizations in the C# interoperability module and I want to be sure I don't break anything.
Describe the problem or limitation you are having in your project
There are no unit test that automatically test the C# integration in Godot. All my tests are manual and it's difficult to spot regressions.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
I suggest adding a test suite for the mono module. This module could be run locally with --test and should be run in the CI pipeline like the other tests preventing regressions.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
I suggest creating a C# project in a sub directory of the mono module. This project is rebuilt at the beginning of the tests (testing the glue and code generator at the same time).
After that, it's a question of creating tests that use CSharpLanguage to test the binding between Godot and C#.
Not all the methods generated needs to be tested since they are generated by code.
To begin, I would suggest tests like:
GetGodotClassPropertyValue
GetGodotMethodList
GetGodotPropertyList
HashGodotClassMethod
InvokeGodotClassMethod
SetGodotClassPropertyValue
Signals
RestoreGodotObjectData
SaveGodotObjectData
Tests these with inheritance
If this enhancement will not be used often, can it be worked around with a few lines of script?
I don't think so.
Is there a reason why this should be core and not an add-on in the asset library?
It's part of the engine.
The text was updated successfully, but these errors were encountered:
Wow, I have been working around C# integrated to Godot for a couple of months now, and I just found out about the project Godot.SourceGenerators.Tests in Godot.NET.Sdk.sln.
Describe the project you are working on
I'm working on optimizations in the C# interoperability module and I want to be sure I don't break anything.
Describe the problem or limitation you are having in your project
There are no unit test that automatically test the C# integration in Godot. All my tests are manual and it's difficult to spot regressions.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
I suggest adding a test suite for the mono module. This module could be run locally with --test and should be run in the CI pipeline like the other tests preventing regressions.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
I suggest creating a C# project in a sub directory of the mono module. This project is rebuilt at the beginning of the tests (testing the glue and code generator at the same time).
After that, it's a question of creating tests that use CSharpLanguage to test the binding between Godot and C#.
Not all the methods generated needs to be tested since they are generated by code.
To begin, I would suggest tests like:
If this enhancement will not be used often, can it be worked around with a few lines of script?
I don't think so.
Is there a reason why this should be core and not an add-on in the asset library?
It's part of the engine.
The text was updated successfully, but these errors were encountered: