mirror of
https://github.com/NixOS/nix
synced 2025-07-07 01:51:47 +02:00
Refactor: rename C++ concatStringsSep -> dropEmptyInitThenConcatStringsSep
This commit is contained in:
parent
b1effc9649
commit
1a8defd06f
33 changed files with 70 additions and 70 deletions
|
@ -227,32 +227,32 @@ namespace nix {
|
|||
}
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* concatStringsSep
|
||||
* dropEmptyInitThenConcatStringsSep
|
||||
* --------------------------------------------------------------------------*/
|
||||
|
||||
TEST(concatStringsSep, buildCommaSeparatedString) {
|
||||
TEST(dropEmptyInitThenConcatStringsSep, buildCommaSeparatedString) {
|
||||
Strings strings;
|
||||
strings.push_back("this");
|
||||
strings.push_back("is");
|
||||
strings.push_back("great");
|
||||
|
||||
ASSERT_EQ(concatStringsSep(",", strings), "this,is,great");
|
||||
ASSERT_EQ(dropEmptyInitThenConcatStringsSep(",", strings), "this,is,great");
|
||||
}
|
||||
|
||||
TEST(concatStringsSep, buildStringWithEmptySeparator) {
|
||||
TEST(dropEmptyInitThenConcatStringsSep, buildStringWithEmptySeparator) {
|
||||
Strings strings;
|
||||
strings.push_back("this");
|
||||
strings.push_back("is");
|
||||
strings.push_back("great");
|
||||
|
||||
ASSERT_EQ(concatStringsSep("", strings), "thisisgreat");
|
||||
ASSERT_EQ(dropEmptyInitThenConcatStringsSep("", strings), "thisisgreat");
|
||||
}
|
||||
|
||||
TEST(concatStringsSep, buildSingleString) {
|
||||
TEST(dropEmptyInitThenConcatStringsSep, buildSingleString) {
|
||||
Strings strings;
|
||||
strings.push_back("this");
|
||||
|
||||
ASSERT_EQ(concatStringsSep(",", strings), "this");
|
||||
ASSERT_EQ(dropEmptyInitThenConcatStringsSep(",", strings), "this");
|
||||
}
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue