formatting

This commit is contained in:
Arthur Passos 2022-12-13 13:20:28 -03:00
parent c303f644f7
commit 1b703d38a5

View File

@ -33,37 +33,78 @@ INSTANTIATE_TEST_SUITE_P(
ValuesCanBeEmptyString,
KeyValuePairExtractorTest,
::testing::ValuesIn(std::initializer_list<LazyKeyValuePairExtractorTestCase>{
{"age:", {{"age", ""}}, KeyValuePairExtractorBuilder().withEscapingProcessor<SimpleKeyValuePairEscapingProcessor>().build()},
{"name: neymar, favorite_movie:,favorite_song:",
{
{"name", "neymar"},
{"favorite_movie", ""},
{"favorite_song", ""},
},
KeyValuePairExtractorBuilder().withEscapingProcessor<SimpleKeyValuePairEscapingProcessor>().build()}}));
{
"age:",
{
{
"age",
""
}
},
KeyValuePairExtractorBuilder().withEscapingProcessor<SimpleKeyValuePairEscapingProcessor>().build()
},
{
"name: neymar, favorite_movie:,favorite_song:",
{
{"name", "neymar"},
{"favorite_movie", ""},
{"favorite_song", ""},
},
KeyValuePairExtractorBuilder().withEscapingProcessor<SimpleKeyValuePairEscapingProcessor>().build()
}
}));
INSTANTIATE_TEST_SUITE_P(
MixString,
KeyValuePairExtractorTest,
::testing::ValuesIn(std::initializer_list<LazyKeyValuePairExtractorTestCase>{
{R"(9 ads =nm, no\:me: neymar, age: 30, daojmskdpoa and a height: 1.75, school: lupe\ picasso, team: psg,)",
{{R"(no:me)", "neymar"}, {"age", "30"}, {"height", "1.75"}, {"school", "lupe picasso"}, {"team", "psg"}},
KeyValuePairExtractorBuilder()
.withEscapingProcessor<SimpleKeyValuePairEscapingProcessor>()
.withValueSpecialCharacterAllowList({'.'})
.build()},
{"XNFHGSSF_RHRUZHVBS_KWBT: F,",
{{"XNFHGSSF_RHRUZHVBS_KWBT", "F"}},
KeyValuePairExtractorBuilder().withEscapingProcessor<SimpleKeyValuePairEscapingProcessor>().build()},
{
R"(9 ads =nm, no\:me: neymar, age: 30, daojmskdpoa and a height: 1.75, school: lupe\ picasso, team: psg,)",
{
{
R"(no:me)", "neymar"
},
{
"age", "30"
},
{
"height", "1.75"
},
{
"school", "lupe picasso"
},
{
"team", "psg"
}
},
KeyValuePairExtractorBuilder()
.withEscapingProcessor<SimpleKeyValuePairEscapingProcessor>()
.withValueSpecialCharacterAllowList({'.'})
.build()
},
{
"XNFHGSSF_RHRUZHVBS_KWBT: F,",
{
{
"XNFHGSSF_RHRUZHVBS_KWBT",
"F"
}
},
KeyValuePairExtractorBuilder().withEscapingProcessor<SimpleKeyValuePairEscapingProcessor>().build()
},
}));
INSTANTIATE_TEST_SUITE_P(
Escaping,
KeyValuePairExtractorTest,
::testing::ValuesIn(std::initializer_list<LazyKeyValuePairExtractorTestCase>{
{"na,me,: neymar, age:30",
{{"age", "30"}},
KeyValuePairExtractorBuilder().withEscapingProcessor<SimpleKeyValuePairEscapingProcessor>().build()},
{
"na,me,: neymar, age:30",
{
{"age", "30"}
},
KeyValuePairExtractorBuilder().withEscapingProcessor<SimpleKeyValuePairEscapingProcessor>().build()
},
{"na$me,: neymar, age:30",
{{"age", "30"}},
KeyValuePairExtractorBuilder().withEscapingProcessor<SimpleKeyValuePairEscapingProcessor>().build()},