Skip to content

Systematic cleanup of tests. #474

@brettviren

Description

@brettviren

WCT has many unit tests in the form test*.cxx. Each one provides a main() and linking them during the build is time consuming. All have one or more of these problems:

  • Each is a main() and thus require long time to link them all.
  • There is no cohesion across the tests (no "suites of cases").
  • Varied use of uncaptured cout/cerr usage (should use logging).
  • Big one: no actual run-time testing (no assertions).
    • Though even these serve as compile-time tests.
  • Rely on humans to look at some plot.
  • Require input files and/or command line args to do anything at all.
    • Really should be "checks".

OTOH, WCT also has doctest tests which avoids all/most of these problems.

The basic plan for addressing this is to migrate tests to doctests and correct what problems we can along the way and/or divert tests to checks.

  1. Have LLM separate test*.cxx into things that really need to be check*.cxx and which are candidates for migrating to doctests.
  2. Have LLM make a beads issue for each test in the to-migrate list.
  3. Develop a claude "command" with instructions on how to migrate a test*.cxx file, including updating a beads issue with summary of what was done, closing it, and opening a new issue if the LLM determines human followup is needed.
  4. Develop a script to iterate on beads with a fresh claude -p for each test.
  5. Run through the tests to migrate.
  6. Human examines any new issues and addresses them in some creative way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions