8000 Generate Abstract Code From Tests · Issue #136 · AlexDarigan/wat · GitHub
[go: up one dir, main page]

Skip to content

Generate Abstract Code From Tests #136

Open

Description

@AlexDarigan

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

  1. added
    enhancement
    4.3
    on May 2, 2020
  2. self-assigned this
    on May 2, 2020
  3. added
    abandoned
    and removed
    4.3
    on Dec 28, 2020
  4. AlexDarigan commented on Dec 28, 2020

    @AlexDarigan
    OwnerAuthor

    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.

  5. removed
    abandoned
    on Dec 26, 2022
  6. AlexDarigan commented on Dec 26, 2022

    @AlexDarigan
    OwnerAuthor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    0