summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests/gdscript_test_runner.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Use OrderedHashMap for autoloads to preserve orderLyuma2021-08-261-5/+5
|
* Use C++ iterators for Lists in many situationsAaron Franke2021-07-231-7/+7
|
* Rename `instance()`->`instantiate()` when it's a verbLightning_A2021-06-191-4/+4
|
* Rename Reference to RefCountedPedro J. Estébanez2021-06-111-3/+3
|
* Core: Move DirAccess and FileAccess to `core/io`Rémi Verschelde2021-06-111-1/+1
| | | | | File handling APIs are typically considered part of I/O, and we did have most `FileAccess` implementations in `core/io` already.
* GDScript: Fix error handler for testsGeorge Marques2021-05-241-4/+3
| | | | | | This changes the error message to be more clear on the output files and also fixes an issue with the relative path of the offending file that was not trimmed correctly.
* Remove uses of `auto` for better readability and online code reviewsHugo Locurcio2021-04-261-2/+2
| | | | | | | | The current code style guidelines forbid the use of `auto`. Some uses of `auto` are still present, such as in UWP code (which can't be currently tested) and macros (where removing `auto` isn't easy).
* Add runner for GDScript testingGeorge Marques2021-04-081-0/+584
This is meant for testing the GDScript implementation, not for testing user scripts nor testing the engine using scripts. Tests consists in a GDScript file and a .out file with the expected output. The .out file format is: expected status (based on the enum GDScriptTest::TestStatus) on the first line, followed by either an error message or the resulting output. Warnings are added after the first line, before the output (or compiler errors) if the parser pass without any error. The test script must have a function called `test()` which takes no argument. Such function will be called by the test runner. The test should not have any dependency unless it's part of the test too. Global classes (using `class_name`) are registered before the runner starts, so those should work if needed. Use the command `godot --gdscript-generate-tests godot-source/modules/gdscript/tests/scripts` to update the .out files with the current output (make sure the output are the expected values before committing). The tests themselves are part of the doctest suite so those can be executed with `godot --test`. Co-authored-by: Andrii Doroshenko (Xrayez) <xrayez@gmail.com>