You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 23, 2024. It is now read-only.
I'm not able to 100% guarantee that I'd have the cycles or be able to do it correctly, but I might be able to have a go at this, so feel free to assign to me if you would like a PR.
Currently @tomfinnie and I are testing arrays and will be using a for loop, which I gather will work in the sense that we can have more than one ASSERT per TEST, but I gather that it would only break on the first ASSERT as-is. Specifically the thing we're trying to do is assert that one (and only one) element in the array has been set to NULL -- that's actually not quite covered by the above, I think (we don't know/care what the other values are), so this specific behaviour looks like it'll be extra to the above-listed assertions.
The text was updated successfully, but these errors were encountered:
Just a thought: I don't believe one can check the length of an array in C, as an array is just a pointer to the starting memory location and a type; with no other information.
Ah, yes, of course. I think that ASSERT_ARRAY_EQUAL would still be do-able, with great care. Maybe even ASSERT_ARRAY_LENGTH one, with even greater care (though perhaps it's not possible practicably), but perhaps it's worth leaving these to the application for now (we were able to use a for loop, as described).
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
We discussed and @MarkWithall suggested these offline; they ought to be noted here too :-)...
ASSERT_ARRAY_EQUAL(actual, expected, length, message)
ASSERT_ARRAY_LENGTH(array, expected_length, message)
I'm not able to 100% guarantee that I'd have the cycles or be able to do it correctly, but I might be able to have a go at this, so feel free to assign to me if you would like a PR.
Currently @tomfinnie and I are testing arrays and will be using a for loop, which I gather will work in the sense that we can have more than one
ASSERT
perTEST
, but I gather that it would only break on the firstASSERT
as-is. Specifically the thing we're trying to do is assert that one (and only one) element in the array has been set toNULL
-- that's actually not quite covered by the above, I think (we don't know/care what the other values are), so this specific behaviour looks like it'll be extra to the above-listed assertions.The text was updated successfully, but these errors were encountered: