Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate Abstract Code From Tests #136

Open
AlexDarigan opened this issue May 2, 2020 · 2 comments
Open

Generate Abstract Code From Tests #136

AlexDarigan opened this issue May 2, 2020 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@AlexDarigan
Copy link
Collaborator

Inspired by this tweet I think we could implement a basic version where when we write projects test-first, we could automatically generate code by parsing the test script.

extends WAT.Test

const Player = preload("pathwhichdoesnotyetexist")
const Coin = preload("anotherpaththatdoesnotexist")

func test_player_pickup() -> void:
    var player = Player.new()
    var coin = Coin.new()
    coin.value = 100
    player.pickup(coin)

    asserts.is_equal(player.score, coin.value`)

After running our generation code, this would create a player script with a score int property and a coin along with a value int property. Player would also have a pickup method that takes a coin type and returns void. They would then be saved at the paths in the const.

@AlexDarigan AlexDarigan added enhancement New feature or request 4.3 feature intended for 4.3 labels May 2, 2020
@AlexDarigan AlexDarigan self-assigned this May 2, 2020
@AlexDarigan AlexDarigan added abandoned Abandoned or put on hold until a feature exists in Godot and removed 4.3 feature intended for 4.3 labels Dec 28, 2020
@AlexDarigan
Copy link
Collaborator Author

This is cool and all but I think between how complicated is to implement plus how much people will actually use it isn't worth the effort.

@AlexDarigan AlexDarigan removed the abandoned Abandoned or put on hold until a feature exists in Godot label Dec 26, 2022
@AlexDarigan
Copy link
Collaborator Author

Reopening unresolved issue. This might be better as a separate plugin.

@AlexDarigan AlexDarigan reopened this Dec 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant