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
Test with recent GTest versions #1666
Conversation
I think so. 2014 is a while ago, but if I look at these and the comments (and think back on it) I think these were my unfinished attempts to have the GMock tests themselves run in CppUTest. I vague remember that that led to some incompatabilities (e.g. things like the death tests in GMock that we don't have (don't want to have) in CppUtest). I am not sure the new GTest versions will be working though. In the past, every gtest version there was some work (read: hacking) to get that to work. |
Are CppUTest's tests sufficient to validate the GTest integration? |
They are invalid to test is all of GTest functionality works within CppUTest. What the CppUTest/GTest integration does is that it tries to discover the GTests that are linked in the same binary and wraps them around a CppUTest TestShell. It also takes over the GMock assertion handler if I'm right. That way it can execute GTest cases as if they are CppUTest cases. However, that does not test all the Gtest/GMock functionality within CppUTest. In order to do that, it would be better to take the GTest self-tests and run those in CppUTest. That failed on some functionality, which means that any basic usages of GTest within CppUTest will work... but that some functionality might cause problems. For me, at the time of writing it, that was good enough and I didn't continue it further. It was also hard since GTest isn't really build to be part of another test runner, so it is definitively a hack on the GTest-side, which is why it has traditionally not been easy to adopt a new version. That said, I guess that part of Gtest doesn't change that often... |
Thank you. That was very helpful. |
Is there any value in merging this given your points? |
It sounds like we could use some integration tests that exercise the subset of functionality that we expect to work. |
Yes, I think so. The GTestTests ought to have some GTest tests that ought to be run in CppUTest. If they pass then the basic GTest/GMock functionality ought to work in CppUTest. In my experience, for most Gtest-test-sets, they don't use more than the basic functionality anyways, so it is fine. |
7f2b90c
to
7c45bff
Compare
I am very skeptical of these results. I don't claim to understand autotools. Could you verify that this is exercising everything it should? I noticed some related code was commented out in: