fix(gtest): INSTANTIATE_TEST_CASE_P with zero variadic arguments

Due to google/googletest#1419 [1], we had to add a comma after the last
argument of INSTANTIATE_TEST_CASE_P.

This was "fixed" in a backwards incompatible way in the googletest
project in 7c4164bf404d899b6d4c74beb1070da5647f55a2

[1]: https://github.com/google/googletest/issues/1419
This commit is contained in:
patrick96 2019-02-06 12:56:39 +01:00 committed by Patrick Ziegler
parent b636baf082
commit 9e595d388e
3 changed files with 4 additions and 4 deletions

View File

@ -36,10 +36,10 @@ vector<pair<double, string>> to_pixels_with_offset_list = {
};
INSTANTIATE_TEST_CASE_P(NoOffset, GeomFormatToPixelsTest,
::testing::ValuesIn(to_pixels_no_offset_list),);
::testing::ValuesIn(to_pixels_no_offset_list));
INSTANTIATE_TEST_CASE_P(WithOffset, GeomFormatToPixelsTest,
::testing::ValuesIn(to_pixels_with_offset_list),);
::testing::ValuesIn(to_pixels_with_offset_list));
TEST_P(GeomFormatToPixelsTest, correctness) {
double exp = GetParam().first;

View File

@ -52,7 +52,7 @@ vector<pair<string, tuple<string, bool, int>>> get_label_text_list = {
};
INSTANTIATE_TEST_CASE_P(Inst, GetLabelTextTest,
::testing::ValuesIn(get_label_text_list),);
::testing::ValuesIn(get_label_text_list));
TEST_P(GetLabelTextTest, correctness) {
label_t m_label = factory_util::shared<label>(get<0>(GetParam().second));

View File

@ -28,7 +28,7 @@ vector<pair<string, string>> parse_action_cmd_list = {
};
INSTANTIATE_TEST_CASE_P(Inst, ParseActionCmd,
::testing::ValuesIn(parse_action_cmd_list),);
::testing::ValuesIn(parse_action_cmd_list));
TEST_P(ParseActionCmd, correctness) {
auto input = GetParam().second;