Fixed parameterized tests with non trivial Param type
There is an issue with non trivial Parameters type in.
Here is an example:
enum class MyEnum { One, Two };
struct TestCaseParam { const char* name; MyEnum enumVal; };
class TestCase : public testing::TestWithParam<TestCaseParam>
INSTANTIATE_TEST_CASE_P(Prefix, TestCase, testing::Values(
TestCaseParam{ "Name", MyEnum::One }
));
TEST_P(TestCase, test)
{ ... }
First issue:
Test Explorer cannot deal with test\0 #GetParam() = <structure binary> in this case. So my fix just removes the #GetParam ... part.
Second issue:
In this example testSuite will be Prefix\TestCase and testMethod will be test\0 #GetParam() = bla-bla-bla
and adapter will be trying to find Prefix\TestCase_test\0_Test::TestBody() method and of course cannot find it. So we need transform this path to TestCase_test_Test::TestBody() one.