Hi,
When compiling sample7_unittest.cc, INSTANTIATE_TEST_SUITE_P gives this compilation error:
$ g++ -std=c++11 -Wno-psabi -Wall -o CMakeFiles/test_va.dir/sample7_unittest.cpp.o -c sample7_unittest.cc
sample7_unittest.cc:113:25: error: expected constructor, destructor, or type conversion before '(' token
INSTANTIATE_TEST_SUITE_P(OnTheFlyAndPreCalculated, PrimeTableTestSmpl7,
^
System :
ubuntu 18.04
libgtest-dev 1.8.0-6 (default latest ubuntu version)
gcc 7.3.0
Thanks for help/workarounds !
These samples are in master - which is new.
You are seem to be using older googletest libgtest-dev 1.8.0-6.
Thanks, indeed in 1.8.0 INSTANTIATE_TEST_CASE_P is used instead.
Not sure whether to open a new issue for this or not, but in README on master there is still "INSTANTIATE_TEST_SUITE_P".
INSTANTIATE_TEST_SUITE_P is correct
On Thu, Feb 28, 2019, 09:56 PPokorski <[email protected] wrote:
Not sure whether to open a new issue for this or not, but in README
https://github.com/google/googletest/blob/master/googletest/docs/advanced.md#how-to-write-value-parameterized-tests
on master there is still "INSTANTIATE_TEST_SUITE_P".—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/google/googletest/issues/2065#issuecomment-468302733,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMJSMqcz3tLxeEiXXUfhtCucklJKHspuks5vR-4QgaJpZM4aFQFi
.
Oh, ok. Because in the context mentioned above
INSTANTIATE_TEST_SUITE_P is also giving me a compile error, so I don't quite get the difference.
This bug is infuriating because the compile error is so unhelpful. It's worse because GitHub is the easiest way to read the docs, but GitHub displays the master docs by default, whereas most users are going to be using a stable branch. Could you please release a 1.8.2 that provides a better compile error when somebody uses INSTANTIATE_TEST_SUITE_P ?
Indeed, I was first confused as well (INSTANTIATE_TEST_SUITE_P works for master, INSTANTIATE_TEST_CASE_P works for 1.8.0)
But in a way, we should be reading the docs that matches our current release ...
I think that a reminder in the master documentation that the macro recently changed would be enough to avoid confusion.
A PR to the documentation would be welcomed to fix this
Thanks
G
On Mon, Mar 18, 2019 at 6:51 AM antismap notifications@github.com wrote:
Indeed, I was first confused as well (INSTANTIATE_TEST_SUITE_P works for
master, INSTANTIATE_TEST_CASE_P works for 1.8.0)
But in a way, we should be reading the docs that matches our current
release ...I think that a reminder in the master documentation that the macro
recently changed would be enough to avoid confusion.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/google/googletest/issues/2065#issuecomment-473861429,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMJSMiprMXfZ0bx_bxrbWVYgGOZfgEJMks5vX2-ygaJpZM4aFQFi
.
Most helpful comment
Thanks, indeed in 1.8.0 INSTANTIATE_TEST_CASE_P is used instead.