You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Activity
AlexDarigan commentedon Dec 28, 2020
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 commentedon Dec 26, 2022
Reopening unresolved issue. This might be better as a separate plugin.