Open glennj opened 3 years ago
This would un-deprecate abortsWith
For completeness also isSameItemsAs
? Thoughts?
Indeed, I missed that one.
Although I find toIncludeSameItemsAs
pretty niche. Have you had circumstances where you need that kind of test? It strikes me that would be a time to write a Set class with an == method.
I added things as needed so I bet it was used in one of the test suites... IIRC its useful for resolving indeterminate order results without having to sort()
both sides [which is stupidly annoying] for equality. To me it seems a useful assertion for exactly that purpose, though perhaps there is a better name to be found?
No suggestions for improvement, except that wren needs a sorted()
method that returns a new list, leaving the original untouched.
sorted() { this[0..-1].sort() }
sorted(comparer) { this[0..-1].sort(comparer) }
Perhaps. :-)
I'd still hate to type sorted()
everywhere. Seems like this is a problem a test library is well suited to solve for the user, no? :-)
except that wren needs a sorted() method that returns a new list,
You could open an issue on wren/wren
.
Although I find
toIncludeSameItemsAs
pretty niche. Have you had circumstances where you need that kind of test?
Self-answering: https://github.com/exercism/wren/blob/108b9a3c429f904dbabf3c50e02ad7d3084c6e90/exercises/practice/custom-set/custom-set.spec.wren#L237
Yes, I didn't add it for no reason. 🤪
These look nice, shouldn't this also include
isEqual
andisNotEqual
though?Originally posted by @joshgoebel in https://github.com/joshgoebel/wren-testie/issues/3#issuecomment-907500977