Skip to content

Capture command line arguments for use in tests #1

@gmbeard

Description

@gmbeard

Currently, there's no way to pass argc / argv to the tests. It would be useful to have these stored in some sort of TestContext type that can be referenced from each test...

McTest(my_test) {
    char const* arg = ::testy::test_context().argv[1];
    ...
}

int main(int argc, char const** argv) {
    return ::testy::run_all_tests(argc, argv);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions