Skip to content

Add tests #8

@ethowitz

Description

@ethowitz

We should add tests for, at minimum, the following cases:

  • A standalone crate
  • A workspace with independent members
  • A workspace with crates that share dependencies
  • A workspace with crates that depend on each other
  • Build scripts/OUT_DIR
  • Proc macros
  • A standalone crate nested under the root of a workspace from which it's excluded
  • Multiple build targets in a single crate
  • Feature flags

We'll want to validate the JSON output to ensure it has what we expect. We'll need to come up with a good way to write tests. Some strategies are:

  • Include directories with the actual crate definitions (Cargo.toml & source files) under tests/ or something for each test case. Downside is that it will be annoying to write tests
  • Add a type/macro to create workspaces/crates in tmp directories on the fly
  • Some third thing that I haven't thought of yet

Metadata

Metadata

Assignees

No one assigned

    Labels

    testRelates to testing

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions