Skip to content

Migrate tests from doctests to #[test]s #718

Open

Description

@nightkr

Doctests require a separate compilation per test, which is slow and uses immense amounts of RAM if allowed to run in parallel.

Activity

  1. NickLarsenNZ commented on Apr 5, 2024

    @NickLarsenNZ
    Member

    Could you please provide an example of moving a doctest to a #[test]?

  2. NickLarsenNZ commented on Apr 16, 2024

    @NickLarsenNZ
    Member

    Ah, I see. There are some ignored doc-tests.

    I quite like the doctests. Or rather that knowing that an example is correct as the code changes.
    An alternative could be to move things out to examples.

  3. NickLarsenNZ commented on Nov 27, 2024

    @NickLarsenNZ
    Member

    I think we might not need this anymore with Rust 2024 on the horizon, which compiles doc-tests into a single binary: https://doc.rust-lang.org/edition-guide/rust-2024/rustdoc-doctests.html

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

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