Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>From looking at the source code of gtest the only case if there are no parametrized tests available is on Windows using VC7.1 with disabled exceptions:</p> <pre><code>// We don't support MSVC 7.1 with exceptions disabled now. Therefore // all the compilers we care about are adequate for supporting // value-parameterized tests. #define GTEST_HAS_PARAM_TEST 1 </code></pre> <p>So, you'll need to check how your MinGW was built and probably update it? And can you run the gtest unit tests to see if they execute the typed parameters test?</p> <p>More information on MinGW:</p> <p>On their <a href="https://code.google.com/p/googletest/wiki/FAQ#Can_I_use_Google_Test_on_MinGW?" rel="nofollow">FAQ</a> they report that when using MinGW the following compile option for building gtest is required: <code>PATH/TO/configure CC="gcc -mno-cygwin" CXX="g++ -mno-cygwin"</code>.</p> <p>Complete Example:</p> <pre><code>#include &lt;gtest/gtest.h&gt; namespace EnsembleClustering { class ParametrizedGTest: public testing::TestWithParam&lt;int&gt; { public: ParametrizedGTest(); virtual ~ParametrizedGTest(); }; ParametrizedGTest::ParametrizedGTest() { } ParametrizedGTest::~ParametrizedGTest() { } TEST_P(ParametrizedGTest, testParameter) { int n = GetParam(); EXPECT_EQ(n, GetParam()); } INSTANTIATE_TEST_CASE_P(ParametrizedGTestInstance, ParametrizedGTest, ::testing::Values(100)); } /* namespace EnsembleClustering */ int main(int argc, char* argv[]) { ::testing::InitGoogleTest(&amp;argc, argv); return RUN_ALL_TESTS(); } </code></pre> <p>I compiled this code using the following compiler call on Mac OS X 10.8:</p> <pre><code>g++ -IGTEST_INCLUDE_DIR -LGTEST_LIB_DIR -lgtest -o tt2 tt2.cpp </code></pre> <p>Where <code>GTEST_INCLUDE_DIR</code> and <code>GTEST_LIB_DIR</code> are the path where header and library files are stored. When you compile and execute, what happens?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload