summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | GDScript: Reintroduce binary tokenization on exportGeorge Marques2024-02-088-22/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds back a function available in 3.x: exporting the GDScript files in a binary form by converting the tokens recognized by the tokenizer into a data format. It is enabled by default on export but can be manually disabled. The format helps with loading times since, the tokens are easily reconstructed, and with hiding the source code, since recovering it would require a specialized tool. Code comments are not stored in this format. The `--test` command can also include a `--use-binary-tokens` flag which will run the GDScript tests with the binary format instead of the regular source code by converting them in-memory before the test runs.
* | | | Fix various typos with codespellRémi Verschelde2024-02-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using 2.2.7.dev115+g0eb441d6. Had to add `cancelled` to the ignore list, as it's a Wayland signal which we're handling in our code, so we don't want codespell to fix that "typo". Also includes the typo fix from #87927. Co-authored-by: Divyanshu Shekhar <61140213+divshekhar@users.noreply.github.com>
* | | | GDScript: Add `is not` operatorDanil Alexeev2024-02-042-0/+17
|/ / /
* | | Merge pull request #86823 from dalexeev/gds-utility-func-as-callableRémi Verschelde2024-01-302-0/+17
|\ \ \ | | | | | | | | | | | | GDScript: Allow utility functions to be used as `Callable`
| * | | GDScript: Allow utility functions to be used as `Callable`Danil Alexeev2024-01-052-0/+17
| | | |
* | | | Revert "Add UID support to GDScript files"Rémi Verschelde2024-01-299-141/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit c7f68a27ec4b825302998eeb5a400f869cd21cf7. We still think GDScript files need UIDs to allow safe refactoring, but we're still debating what form those should take exactly. So far there seems to be agreement that it shouldn't be done via an annotation as implemented here, so we're reverting this one for now, to revisit the feature in a future PR.
* | | | Merge pull request #87294 from vnen/allow-free-callableRémi Verschelde2024-01-182-0/+13
|\ \ \ \ | | | | | | | | | | | | | | | Allow `free()` to be used as Callable
| * | | | Allow `free()` to be used as CallableGeorge Marques2024-01-182-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method is registered in a special way so ClassDB doesn't naturally know about its existence. Here it is hardcoded if any other option fail to check if it is about the `free()` method and, if so, say it exists and return a Callable.
* | | | | Merge pull request #67132 from ↵Rémi Verschelde2024-01-189-0/+141
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | KoBeWi/This_commit_message_is_auto-generated._Do_not_modify_it- Add UID support to GDScript files
| * | | | | Add UID support to GDScript fileskobewi2024-01-179-0/+141
| |/ / / /
* / / / / Allow specifying a scene in completion testsHolonProduction2024-01-083-8/+53
|/ / / /
* | | | Merge pull request #85178 from HolonProduction/completion-testsRémi Verschelde2024-01-0814-11/+220
|\ \ \ \ | |/ / / |/| | | | | | | Add unit test runner for autocompletion
| * | | Add unit test runner for autocompletionHolonProduction2024-01-0514-11/+220
| | | |
* | | | Merge pull request #83120 from ↵Rémi Verschelde2024-01-042-0/+6
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | dalexeev/gds-allow-property-getter-empty-parentheses GDScript: Allow empty parentheses for property getter declaration
| * | | | GDScript: Allow empty parentheses for property getter declarationDanil Alexeev2023-10-112-0/+6
| | | | |
* | | | | Merge pull request #82639 from golfinq/gdscript-improve-indexing-errorRémi Verschelde2024-01-046-6/+6
|\ \ \ \ \ | |_|/ / / |/| | | | | | | | | GDScript: Improve error messages for invalid indexing
| * | | | GDScript: Improve error messages for invalid indexingRémi Verschelde2023-10-026-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These errors are very common when using an invalid property name or calling on an object of the wrong type, and the previous message was a bit cryptic for users. Co-authored-by: Rémi Verschelde <rverschelde@gmail.com> Co-authored-by: golfinq <golfinqz@gmail.com>
* | | | | Merge pull request #86088 from ↵Rémi Verschelde2024-01-022-1/+9
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dalexeev/gds-fix-static-func-as-callable-in-static-context GDScript: Fix accessing static function as `Callable` in static context
| * | | | | GDScript: Fix accessing static function as `Callable` in static contextDanil Alexeev2023-12-122-1/+9
| | |_|/ / | |/| | |
* | | | | Merge pull request #82264 from dalexeev/core-builtin-methods-as-callablesRémi Verschelde2024-01-022-0/+9
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | Core: Allow methods of built-in `Variant` types to be used as Callables
| * | | | Core: Allow methods of built-in `Variant` types to be used as CallablesDanil Alexeev2023-10-252-0/+9
| | |_|/ | |/| |
* / | | Correctly check scripts that must inherit `EditorPlugin`Yuri Sizov2023-11-231-6/+5
|/ / / | | | | | | | | | | | | Also updates some error messages related to this kind of check across the codebase.
* | | GDScript: Fix non-static call is allowed in static var lambda bodyDanil Alexeev2023-10-209-1/+67
| | |
* | | GDScript: Fix incorrect error message for utility functionsDanil Alexeev2023-10-168-0/+26
| |/ |/|
* | GDScript: Replace ptrcalls on MethodBind to validated callsGeorge Marques2023-10-061-3/+3
| | | | | | | | | | | | | | | | | | This improves the performance of typed calls to engine methods when the argument types are exact. Using validated calls delegate more of the work the core instead of doing argument unpacking in the VM. It also does not need different instructions for each return type, simplifying the code.
* | GDScript: Add error when exporting node in non [Node]-derived classesDanil Alexeev2023-10-058-1/+39
| |
* | Core: Fix `Object::has_method()` for script static methodsDanil Alexeev2023-10-042-0/+15
| |
* | Merge pull request #82547 from ↵Rémi Verschelde2023-10-033-9/+49
|\ \ | | | | | | | | | | | | | | | dalexeev/gds-fix-unsafe-call-arg-variant-constructors GDScript: Fix `UNSAFE_CALL_ARGUMENT` warning for `Variant` constructors
| * | GDScript: Fix `UNSAFE_CALL_ARGUMENT` warning for `Variant` constructorsDanil Alexeev2023-09-303-9/+49
| |/
* | Merge pull request #79425 from vnen/gdscript-load-classes-for-debug-testsRémi Verschelde2023-10-031-0/+10
|\ \ | | | | | | | | | GDScript: Load global classes when running debug tests
| * | GDScript: Load global classes when running debug testsGeorge Marques2023-07-131-0/+10
| | | | | | | | | | | | | | | So when running compiler debug tests it works with dependencies within a project.
* | | Add type_string() utilityJakub Janšta2023-10-021-83/+1
| |/ |/|
* | Merge pull request #82477 from dalexeev/gds-covariance-and-contravarianceYuri Sizov2023-09-2818-0/+138
|\ \ | | | | | | | | | GDScript: Add return type covariance and parameter type contravariance
| * | GDScript: Add return type covariance and parameter type contravarianceDanil Alexeev2023-09-2818-0/+138
| | |
* | | Merge pull request #82186 from dalexeev/gds-fix-property-duplicationYuri Sizov2023-09-282-0/+69
|\ \ \ | | | | | | | | | | | | GDScript: Fix duplication of inherited script properties
| * | | GDScript: Fix duplication of inherited script propertiesDanil Alexeev2023-09-232-0/+69
| | | |
* | | | Merge pull request #82030 from dalexeev/gds-make-for-loop-array-literal-typedYuri Sizov2023-09-284-0/+17
|\ \ \ \ | | | | | | | | | | | | | | | GDScript: Make array literal typed if `for` loop variable type is specified
| * | | | GDScript: Make array literal typed if `for` loop variable type is specifiedDanil Alexeev2023-09-214-0/+17
| | | | |
* | | | | Merge pull request #80085 from vnen/gdscript-pattern-guardsYuri Sizov2023-09-288-0/+99
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | GDScript: Implement pattern guards for match statement
| * | | | GDScript: Implement pattern guards for match statementGeorge Marques2023-09-278-0/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Within a match statement, it is now possible to add guards in each branch: var a = 0 match a: 0 when false: print("does not run") 0 when true: print("but this does") This allows more complex logic for deciding which branch to take.
* | | | | Merge pull request #75988 from dalexeev/gds-unsafe-call-argumentYuri Sizov2023-09-2720-1/+114
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | GDScript: Improve call analysis
| * | | | GDScript: Improve call analysisDanil Alexeev2023-09-2120-1/+114
| |/ / / | | | | | | | | | | | | | | | | | | | | * Add missing `UNSAFE_CALL_ARGUMENT` warning. * Fix `Object` constructor. * Display an error for non-existent static methods.
* | | | Merge pull request #82139 from dalexeev/gds-add-inferred-declaration-warningRémi Verschelde2023-09-261-1/+1
|\ \ \ \ | | | | | | | | | | | | | | | GDScript: Add `INFERRED_DECLARATION` warning
| * | | | GDScript: Add `INFERRED_DECLARATION` warningDanil Alexeev2023-09-221-1/+1
| |/ / /
* | / / Check if any global script class is shadowed by a variableChia-Hsiang Cheng2023-09-262-9/+16
| |/ / |/| |
* | | GDScript: Prevent constructing and inheriting engine singletonsDanil Alexeev2023-09-224-0/+12
|/ /
* | Merge pull request #81332 from ↵Rémi Verschelde2023-09-202-0/+29
|\ \ | | | | | | | | | | | | | | | dalexeev/gds-fix-update-array-literal-in-weak-context GDScript: Don't make array literal typed in weak type context
| * | GDScript: Don't make array literal typed in weak type contextDanil Alexeev2023-09-052-0/+29
| | |
* | | Merge pull request #79510 from dalexeev/gds-fix-const-non-metatype-subscriptRémi Verschelde2023-09-203-0/+172
|\ \ \ | | | | | | | | | | | | GDScript: Fix subscript resolution for constant non-metatypes
| * | | GDScript: Fix subscript resolution for constant non-metatypesDanil Alexeev2023-09-193-0/+172
| | | |