Skip to content

Add testability features to re_log #6450

@abey79

Description

@abey79

At a minimum, there should be a re_log::setup_test_logging() function to be used by tests, such that any warning or error panics (these should be considered test failures).

Ideally, there should be additional feature to, e.g., assert that a warning/error with some content is logged under some circumstances:

// panics if:
// - test code logs a warning that doesn't contain "a bad thing has happened"
// - test code DOES NOT log a warning that contains "a bad thing has happened"
re_log::assert_warning("a bad thing has happened", || {
    /* test code */
};

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions