Skip to content

Conversation

@windowsair
Copy link

#170

This patch adds support for the execution order of cases. Users can define a non-negative ORDER value to determine the execution order of cases. Cases with a smaller ORDER value will be executed first.

Add following macros:

  • UTEST_ORDER(SET, NAME, ORDER)
  • UTEST_F_ORDER(FIXTURE, NAME, ORDER)
  • UTEST_I_ORDER(FIXTURE, NAME, INDEX, ORDER)

@sheredom
Copy link
Owner

Just to check - if we just always sorted the tests by name, would that be sufficient rather than this?

@windowsair
Copy link
Author

Do you want something like a default execution order? I'd prefer the order to be determined by the definition sequence of macros rather than names.

@sheredom
Copy link
Owner

Naw naw the patch is fine, just wanted to double check that wouldn't work for you first before approving :)

@windowsair
Copy link
Author

Oh, I'm not sure why the CI failed. It seems unrelated to the new code.

@windowsair windowsair force-pushed the master branch 2 times, most recently from ef988d2 to 5134237 Compare June 10, 2025 11:53
This patch adds support for the execution order of cases.
Users can define a non-negative ORDER value to determine the
execution order of cases. Cases with a smaller ORDER value will be
executed first.

Add following macros:
- UTEST_ORDER(SET, NAME, ORDER)
- UTEST_F_ORDER(FIXTURE, NAME, ORDER)
- UTEST_I_ORDER(FIXTURE, NAME, INDEX, ORDER)
@windowsair
Copy link
Author

Looks like CI passed! I changed the code so that the default behavior should not change :)

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.

2 participants