Remove / from parameterized test names if base test name is empty
This is useful to let a subsystem generate test names based on parameterized tests without exposing them as such to the user. Signed-off-by: Knut Omang <knut.omang@oracle.com>
This commit is contained in:
@@ -96,6 +96,18 @@ INSTANTIATE_TEST_SUITE_P(PrintingFailingParams,
|
||||
FailingParamTest,
|
||||
testing::Values(2));
|
||||
|
||||
// Tests that an empty value for the test suite basename yields just
|
||||
// the test name without any prior /
|
||||
class EmptyBasenameParamInst : public testing::TestWithParam<int> {};
|
||||
|
||||
TEST_P(EmptyBasenameParamInst, Passes) {
|
||||
EXPECT_EQ(1, GetParam());
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_SUITE_P(,
|
||||
EmptyBasenameParamInst,
|
||||
testing::Values(1));
|
||||
|
||||
static const char kGoldenString[] = "\"Line\0 1\"\nLine 2";
|
||||
|
||||
TEST(NonfatalFailureTest, EscapesStringOperands) {
|
||||
|
||||
Reference in New Issue
Block a user