tau icon indicating copy to clipboard operation
tau copied to clipboard

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

Open catbro666 opened this issue 1 year ago • 4 comments

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]);
}

catbro666 avatar Jun 19 '23 12:06 catbro666

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?

jasmcaus avatar Jun 22 '23 11:06 jasmcaus

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.

catbro666 avatar Jun 26 '23 12:06 catbro666

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?

jasmcaus avatar Jun 27 '23 15:06 jasmcaus

OK, I can try.

catbro666 avatar Jun 29 '23 11:06 catbro666