Apply modernize-use-emplace.

This commit is contained in:
Alexander Arlt
2020-04-02 17:35:48 -05:00
parent 82f57f0465
commit 90bb1d8a7c
14 changed files with 33 additions and 49 deletions
+4 -4
View File
@@ -76,13 +76,13 @@ BOOST_AUTO_TEST_CASE(test_alternatives_list)
{
vector<string> strings;
BOOST_CHECK_EQUAL(quotedAlternativesList(strings), "");
strings.push_back("a");
strings.emplace_back("a");
BOOST_CHECK_EQUAL(quotedAlternativesList(strings), "\"a\"");
strings.push_back("b");
strings.emplace_back("b");
BOOST_CHECK_EQUAL(quotedAlternativesList(strings), "\"a\" or \"b\"");
strings.push_back("c");
strings.emplace_back("c");
BOOST_CHECK_EQUAL(quotedAlternativesList(strings), "\"a\", \"b\" or \"c\"");
strings.push_back("d");
strings.emplace_back("d");
BOOST_CHECK_EQUAL(quotedAlternativesList(strings), "\"a\", \"b\", \"c\" or \"d\"");
}