-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add shared testing harness for all Buffer-conforming types we ship #6
Comments
Test contexts implemented with XCTContext may be useful here. @DivineDominion Is that also a good first issue? The scope of this seems to be quite narrow. |
Oh yeah, that could work indeed for non-UI tests! Changing that should be simple enough because it's a mechanical change where you'd mostly need to make sure the common tests cover the most ground (in case some of the tests have more assertions than others).
My recommendation to approach this would be to start without breaking anything, additively, with the expectation that the tests all stay green (apart from the note above), e.g.
|
E.g.
NSTextViewBuffer
,MutableStringBuffer
,Undoable<Buffer>
should all behave the same.I went with code duplication for each of these so far, but that's getting a bit tedious. I notice that I'm feeling a resistance towards adding new shared
Buffer
features or changing the API because I need to touch 3+ test suites.A shared suite would be cool. As a matter of fact, I have never used something like that with
XCTest
, though.A naive approach would be to merge all test files into 1, and then add a helper that transforms this:
... into something like this:
The text was updated successfully, but these errors were encountered: