String s3(lst.begin(), lst.end());
EXPECT_EQ(test, s3);
// Constructor from wchar_t iterators
std::list<wchar_t> lst1;
String s3(lst.begin(), lst.end());
EXPECT_EQ(test, s3);
// Constructor from wchar_t iterators
std::list<wchar_t> lst1;
String s4(lst1.begin(), lst1.end());
EXPECT_EQ(test, s4);
// Constructor from wchar_t pointers
String s4(lst1.begin(), lst1.end());
EXPECT_EQ(test, s4);
// Constructor from wchar_t pointers
- if (test.empty()) test = String(empty.begin(), empty.end());
- else test = String(notempty.begin(), notempty.end());
+ if (test.empty()) {
+ test = String(empty.begin(), empty.end());
+ } else {
+ test = String(notempty.begin(), notempty.end());
+ }
String s;
randomString(&s, maxString);
int tristate = test.compare(s);
String s;
randomString(&s, maxString);
int tristate = test.compare(s);
String s;
randomString(&s, maxString);
int tristate = test.compare(s.c_str());
String s;
randomString(&s, maxString);
int tristate = test.compare(s.c_str());
- if (tristate > 0) tristate = 1;
- else if (tristate < 0) tristate = 2;
- Num2String(test, tristate);
+ if (tristate > 0) {
+ tristate = 1;
+ } else if (tristate < 0) {
+ tristate = 2;
+ }
+ Num2String(test, tristate);
void(*f_fbstring)(folly::fbstring&),
void(*f_wfbstring)(folly::basic_fbstring<wchar_t>&)) {
do {
void(*f_fbstring)(folly::fbstring&),
void(*f_wfbstring)(folly::basic_fbstring<wchar_t>&)) {
do {
auto mbv = std::vector<char>(wret + 1);
auto mb = mbv.data();
int ret = wcstombs(mb, wc.c_str(), wret + 1);
auto mbv = std::vector<char>(wret + 1);
auto mb = mbv.data();
int ret = wcstombs(mb, wc.c_str(), wret + 1);
// other than libstdc++. Someday if we deem it important to present
// identical undefined behavior for other platforms, we can re-visit this.
TEST(FBString, testConstructionFromLiteralZero) {
// other than libstdc++. Someday if we deem it important to present
// identical undefined behavior for other platforms, we can re-visit this.
TEST(FBString, testConstructionFromLiteralZero) {