I have a test fixture class which is currently used by many tests.
#include <gtest/gtest.h>
class MyFixtureTest : public ::testing::Test {
void SetUp() { ... }
};
I would like to create a parameterized test which also uses all that MyFixtureTest has to offer, without needing to change all my existing tests.
How do I do that?
I hav...
I'm looking for something similar to the ASSERT_EQ / ASSERT_NE for ASSERT_DOUBLE_EQ.
Maybe I'm missing an easy way of doing this without having a ASSERT_DOUBLE_NE?
...
I saw the documentation of that feature is seem pretty major since it's in Google Test overview features and detailed in: http://code.google.com/p/googletest/wiki/AdvancedGuide#Death_Tests
They look like standard assert() but they're part of Google Test, so a xUnit testing framework. Therefor I wonder the real usage or advantage of usin...
Hello,
I'm programming some unit test with google test framework. But I want to check is some asserts are well placed and are useful. So my question is: does exists a way to catch an assert in google test?
Example:
int factorial(int n){
assert(n >= 0);
//....
}
And then the test:
#include <gtest/gtest.h>
TEST(FactorialTest,...
Is it possible to capture the stdout and stderr when using the googletest framework?
For example, I would like to call a function that writes errors to the console (stderr).
Now, when calling the function in the tests, I want to assert that no output appears there.
Or, maybe I want to test the error behaviour and want to assert that a ...
I am trying to build a googletest unit test for a proof of concept as a new unit testing framework that we could possibly use. In googletest, there are two ways to write a unit test: with a main, or without a main. If you do not define a main, you can link in the gtest_main library, which includes a main() function for you, saving you ...
I've downloaded google test, but now I've no idea on how to link it to my project in eclipse.
Should I add it as a source folder? Should include it as g++ included library? And how can I run test then?
...