Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If we do tests in a loop, it seems we don't have an easy way to prompt which iteration failed #38

Open
catbro666 opened this issue Jun 19, 2023 · 4 comments

Comments

@catbro666
Copy link
Contributor

Do you have any advice for such user cases?

int input[] = {1, 2, 3, 4};
int output[] = {1, 2, 3, 4};
for (int i = 0; i < 4, i++) {
  // ...
  CHECK_EQ(result, output[i]);
}
@jasmcaus
Copy link
Owner

Hmm, currently no. I suppose this is a very niche use case (to create an entirely separate macro). Are you tests working like this with this implementation?

@catbro666
Copy link
Contributor Author

yeah, if all tests pass, everything is ok. If some tests fail, then I need to check them one by one to figure out which one fails.

@jasmcaus
Copy link
Owner

I see. I guess it makes sense to introduce a LOOP check then, but it'll be very restricted to just ints or max, floats. Interested in making a PR for this?

@catbro666
Copy link
Contributor Author

OK, I can try.

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

No branches or pull requests

2 participants