-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GD-594: Fix mock fails on class with parameter getter setter (#595)
# Why see #594 # What There was a bug in the script parser using hard coded check for getter/setter parameter named `type`. Fixed by using a pattern to detect a getter/setter matching.
- Loading branch information
1 parent
62a26e4
commit c3e2137
Showing
3 changed files
with
38 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
addons/gdUnit4/test/mocker/resources/ClassWithParameterGetterSetter.gd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
class_name ClassWithParameterGetterSetter | ||
extends RefCounted | ||
|
||
|
||
var _session_count: int = 42: | ||
get: | ||
return _session_count | ||
set(value): | ||
_session_count = value | ||
|
||
|
||
func session_count() -> int: | ||
return _session_count |