-
Notifications
You must be signed in to change notification settings - Fork 284
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
Fix version compatibility test. #315
Conversation
64348e5
to
0c6813f
Compare
@sudden6 I've added some tests. I think these tests should pass, but they don't. They don't pass on the old macro either, so it seems the old macro was broken to begin with. Do you think these tests should pass? Also, if you can, please add some tests of your own, as these are currently incomplete. |
335b97b
to
fac9afd
Compare
Unassigning myself, since I rewrote the version check macro. Someone else needs to review. |
fac9afd
to
c85c5c8
Compare
Reviewed 3 of 5 files at r1, 2 of 2 files at r2. Comments from Reviewable |
c85c5c8
to
206c9d2
Compare
Reviewed 1 of 5 files at r1. CMakeLists.txt, line 430 at r3 (raw file):
move this above if(BUILD_TOXAV) and add a blank line between the must run, and optionally run toxcore/tox.api.h, line 193 at r3 (raw file):
tabs and not spaces? toxcore/tox.h, line 195 at r3 (raw file):
Comments don't belong inside a macro, around is fine. If that's a problem, the macro is too big. Comments from Reviewable |
206c9d2
to
beb0628
Compare
Reviewed 2 of 3 files at r4. auto_tests/version_test.c, line 18 at r3 (raw file):
this hurts readability, this should be another if tests should be 'glance-able' Comments from Reviewable |
Review status: 4 of 5 files reviewed at latest revision, 4 unresolved discussions. CMakeLists.txt, line 430 at r3 (raw file): Previously, GrayHatter (Gregory Mullen) wrote…
Done. toxcore/tox.api.h, line 193 at r3 (raw file): Previously, GrayHatter (Gregory Mullen) wrote…
Done. toxcore/tox.h, line 195 at r3 (raw file): Previously, GrayHatter (Gregory Mullen) wrote…
The macro is necessarily big. The logic is complicated. We can't make it smaller, because this needs to work in the preprocessor. The only way to make this smaller is by making helper macros, and those won't help maintainability. Comments from Reviewable |
Reviewed 1 of 5 files at r1, 1 of 3 files at r4. toxcore/tox.h, line 195 at r3 (raw file): Previously, iphydf wrote…
That's what I was suggesting, and it's what I would have done myself. Either way, for what it is, with a test to back it up LFTM (looks fine to me) Comments from Reviewable |
beb0628
to
7e17982
Compare
Also added some test cases for it.
7e17982
to
3cfe554
Compare
This doesn't have any tests covering the case where a client requests a major version < TOX_VERSION_MAJOR, so that might be something we'll want to add. |
Reviewed 1 of 5 files at r1, 3 of 3 files at r4, 1 of 1 files at r5. toxcore/tox.h, line 197 at r5 (raw file):
I'd add Comments from Reviewable |
When the version number has trailing zeros, a change of the first non-zero number means a break in API compatibility. eg. 0.0.1 to 0.0.2 means a break, 0.3.0 to 0.4.0 means a break, but 0.3.0 to 0.3.1 means not.
This change is