Replies: 1 comment
-
Hi @Warwolt, Very short answer: yes, any test program that returns a non-zero exit code is considered as a failing test, and therefore killing the mutant. Somewhat more historical details follow.
#include "gtest/gtest.h"
int sum(int a, int b) {
return a + b;
}
TEST(GoogleTest, example) {
ASSERT_EQ(sum(4, 5), 9);
}
int main() {
testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
} For this program, Mull would gather code coverage info in the form of a call tree, e.g.:
In the case of the explicit test framework support, we know that the The drawback of this approach is that we cannot know for sure (at least I'm not aware of a way to do it) how to build the call-tree for a multithreaded program: we'd need to build a call-tree for each thread and then somehow merge those into one.
I apologize for the chaotic response, I didn't have time to write a short and conscise answer :) |
Beta Was this translation helpful? Give feedback.
-
As of version 0.9, support for test frameworks such as GoogleTest have been deprecated as a consequence of phasing out just in time compilation support.
Going forward, will the general approach for using Mull to be to just run an executable that returns a non-zero return code if the code-under-test does not conform to the tests? I've only used Mull together with gtest, so it would be nice to hear you maintainers thoughts around the best practice of Mull v0.9 together with frameworks moving forward.
Beta Was this translation helpful? Give feedback.
All reactions