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
In 02-prims.t, we're testing with ~~mem because we only care about "is it a member or not"? But we could restate all those tests as searches instead, and get a more meaningful number back. (The index of the element list in which we found a match.)
Also, go through the other instances of ~~ in other test files, and see if we can similarly lift them into something more meaningful. Maybe in some cases we can simply group them into a single test instead of testing things one by one.
The text was updated successfully, but these errors were encountered:
(The index of the element list in which we found a match.)
I'm not sure I like that idea, 2-and-some years later. Who cares about the index? Why make the test brittle in that particular way?
That said, I do think those tests can be rephrased. Maybe we can conditionally push the corresponding symbol to a list, do a quick diff with the expected list and test that this diff is empty?
In 02-prims.t, we're testing with
~~mem
because we only care about "is it a member or not"? But we could restate all those tests as searches instead, and get a more meaningful number back. (The index of the element list in which we found a match.)Also, go through the other instances of
~~
in other test files, and see if we can similarly lift them into something more meaningful. Maybe in some cases we can simply group them into a single test instead of testing things one by one.The text was updated successfully, but these errors were encountered: