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.
The text was updated successfully, but these errors were encountered:
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.
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.
The text was updated successfully, but these errors were encountered: