Skip to content

Conversation

skogseth
Copy link
Contributor

Resolves #16.

After some discussion on #16 I went with the approach of accepting attributes following #[test] (for now only #[ignore] is accepted), as this would allow us to accept the standard syntax #[ignore = "some reason"] (and later #[should_panic = "some expected message"]). These are not allowed in custom attributes, but so long as we don't emit these (only parse them internally) it's all good.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 18709095491

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.3%) to 30.736%

Totals Coverage Status
Change from base Build 18662789275: 0.3%
Covered Lines: 505
Relevant Lines: 1643

💛 - Coveralls

Comment on lines +58 to +68
#[libtest2::test]
#[ignore]
fn sheep(context: &libtest2::TestContext) -> libtest2::RunResult {
Err(libtest2::RunError::fail("got lost blindly following the flock"))
}
#[libtest2::test]
#[ignore = "slow"]
fn horse(context: &libtest2::TestContext) -> libtest2::RunResult {
Ok(())
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tests are kept in sync with libtest2-mimic.

Could you have a commit before this one add these different cases in both sets of tests? This commit would just be about translated from the API to the attribute

@epage
Copy link
Collaborator

epage commented Oct 22, 2025

Looks good minus the test organization issue, thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

#[ignore] macro support

3 participants