How to run gdscript in module test? 🤔

Godot Version

4.2 0c957c0d5f4e519aa8b50cae18f37d20ea6ae2bb


I am writing tests for my c++ module. I wanted to run gdscript as part of the test and decided to copy-paste code from gdscript_test_runner_suite.h, as a starting point, however it does not work in my module test file, even though it does in the original file. More information in the screenshot:

Any advice on how to fix the issue would be greatly appreciated.

Solved - had to add GDScriptTests::GDScriptTestRunner runner("modules/gdscript/tests/scripts", true, false); at the start of the test.

1 Like