proxygen
|
#include <folly/String.h>
#include <tuple>
#include <cinttypes>
#include <set>
#include <boost/regex.hpp>
#include <folly/container/Array.h>
#include <folly/portability/GTest.h>
#include <folly/test/TestUtils.h>
Go to the source code of this file.
Classes | |
struct | PrettyTestCase |
struct | my::ColorError |
Namespaces | |
my | |
Macros | |
#define | __STDC_FORMAT_MACROS 1 |
Enumerations | |
enum | my::Color { my::Color::Red, my::Color::Blue } |
enum | my::ColorErrorCode { my::ColorErrorCode::INVALID_COLOR } |
Functions | |
TEST (StringPrintf, BasicTest) | |
TEST (StringPrintf, NumericFormats) | |
TEST (StringPrintf, Appending) | |
void | vprintfCheck (const char *expected, const char *fmt,...) |
void | vprintfError (const char *fmt,...) |
TEST (StringPrintf, VPrintf) | |
TEST (StringPrintf, VariousSizes) | |
TEST (StringPrintf, oldStringPrintfTests) | |
TEST (StringPrintf, oldStringAppendf) | |
TEST (Escape, cEscape) | |
TEST (Escape, cUnescape) | |
TEST (Escape, uriEscape) | |
TEST (Escape, uriUnescape) | |
TEST (Escape, uriEscapeAllCombinations) | |
TEST (Escape, uriUnescapePercentDecoding) | |
TEST (PrettyPrint, Basic) | |
TEST (PrettyToDouble, Basic) | |
TEST (PrettyPrint, HexDump) | |
TEST (System, errnoStr) | |
TEST (Split, split_vector) | |
TEST (Split, split_fbvector) | |
TEST (Split, pieces_vector) | |
TEST (Split, pieces_fbvector) | |
TEST (Split, fixed) | |
TEST (Split, std_string_fixed) | |
TEST (Split, fixed_convert) | |
ColorError | my::makeConversionError (ColorErrorCode, StringPiece sp) |
Expected< StringPiece, ColorErrorCode > | my::parseTo (StringPiece in, Color &out) noexcept |
TEST (Split, fixed_convert_custom) | |
TEST (String, join) | |
TEST (String, hexlify) | |
TEST (String, unhexlify) | |
TEST (String, backslashify) | |
TEST (String, humanify) | |
TEST (String, toLowerAsciiAligned) | |
TEST (String, toLowerAsciiUnaligned) | |
TEST (String, whitespace) | |
TEST (String, stripLeftMargin_really_empty) | |
TEST (String, stripLeftMargin_empty) | |
TEST (String, stripLeftMargin_only_whitespace) | |
TEST (String, stripLeftMargin_only_uneven_whitespace) | |
TEST (String, stripLeftMargin_one_line) | |
TEST (String, stripLeftMargin_two_lines) | |
TEST (String, stripLeftMargin_three_lines_uneven) | |
TEST (String, stripLeftMargin_preceding_blank_lines) | |
TEST (String, stripLeftMargin_succeeding_blank_lines) | |
TEST (String, stripLeftMargin_interstitial_undented_whiteline) | |
TEST (String, stripLeftMargin_interstitial_dedented_whiteline) | |
TEST (String, stripLeftMargin_interstitial_equidented_whiteline) | |
TEST (String, stripLeftMargin_interstitial_indented_whiteline) | |
TEST (String, stripLeftMargin_no_pre_whitespace) | |
TEST (String, stripLeftMargin_no_post_whitespace) | |
Variables | |
PrettyTestCase | prettyTestCases [] |
#define __STDC_FORMAT_MACROS 1 |
Definition at line 18 of file StringTest.cpp.
TEST | ( | StringPrintf | , |
BasicTest | |||
) |
TEST | ( | StringPrintf | , |
NumericFormats | |||
) |
TEST | ( | StringPrintf | , |
Appending | |||
) |
Definition at line 67 of file StringTest.cpp.
References EXPECT_EQ, s, and folly::stringAppendf().
TEST | ( | StringPrintf | , |
VPrintf | |||
) |
Definition at line 122 of file StringTest.cpp.
References vprintfCheck(), and vprintfError().
TEST | ( | StringPrintf | , |
VariousSizes | |||
) |
TEST | ( | StringPrintf | , |
oldStringPrintfTests | |||
) |
Definition at line 156 of file StringTest.cpp.
References a, b, EXPECT_EQ, folly::size(), and folly::stringPrintf().
TEST | ( | StringPrintf | , |
oldStringAppendf | |||
) |
Definition at line 169 of file StringTest.cpp.
References EXPECT_EQ, s, and folly::stringAppendf().
TEST | ( | Escape | , |
cEscape | |||
) |
TEST | ( | Escape | , |
cUnescape | |||
) |
Definition at line 184 of file StringTest.cpp.
References EXPECT_EQ, and EXPECT_THROW_RE.
TEST | ( | Escape | , |
uriEscape | |||
) |
TEST | ( | Escape | , |
uriUnescape | |||
) |
Definition at line 224 of file StringTest.cpp.
References c, EXPECT_EQ, EXPECT_GE, EXPECT_LE, EXPECT_THROW, folly::QUERY, and s.
TEST | ( | Escape | , |
uriEscapeAllCombinations | |||
) |
Definition at line 248 of file StringTest.cpp.
References c, folly::basic_fbstring< E, T, A, Storage >::clear(), EXPECT_EQ, i, folly::uriEscape(), and folly::uriUnescape().
TEST | ( | Escape | , |
uriUnescapePercentDecoding | |||
) |
Definition at line 276 of file StringTest.cpp.
References c, folly::basic_fbstring< E, T, A, Storage >::clear(), EXPECT_EQ, EXPECT_THROW, i, int64_t, folly::basic_fbstring< E, T, A, Storage >::size(), and folly::uriUnescape().
TEST | ( | PrettyPrint | , |
Basic | |||
) |
Definition at line 438 of file StringTest.cpp.
References EXPECT_EQ, i, folly::PRETTY_NUM_TYPES, folly::prettyPrint(), PrettyTestCase::prettyString, PrettyTestCase::prettyType, and PrettyTestCase::realValue.
TEST | ( | PrettyToDouble | , |
Basic | |||
) |
Definition at line 447 of file StringTest.cpp.
References ADD_FAILURE, folly::exceptionStr(), EXPECT_DOUBLE_EQ, EXPECT_EQ, EXPECT_NEAR, EXPECT_THROW, i, folly::PRETTY_NUM_TYPES, folly::PRETTY_SI, folly::PRETTY_UNITS_METRIC, folly::prettyPrint(), PrettyTestCase::prettyString, folly::prettyToDouble(), PrettyTestCase::prettyType, PrettyTestCase::realValue, string, and x.
TEST | ( | PrettyPrint | , |
HexDump | |||
) |
Definition at line 494 of file StringTest.cpp.
References a, EXPECT_EQ, folly::hexDump(), and string.
TEST | ( | System | , |
errnoStr | |||
) |
Definition at line 510 of file StringTest.cpp.
References folly::errnoStr(), EXPECT_EQ, folly::split(), and start.
TEST | ( | Split | , |
split_vector | |||
) |
Definition at line 832 of file StringTest.cpp.
TEST | ( | Split | , |
split_fbvector | |||
) |
Definition at line 835 of file StringTest.cpp.
TEST | ( | Split | , |
pieces_vector | |||
) |
Definition at line 838 of file StringTest.cpp.
TEST | ( | Split | , |
pieces_fbvector | |||
) |
Definition at line 841 of file StringTest.cpp.
TEST | ( | Split | , |
fixed | |||
) |
Definition at line 845 of file StringTest.cpp.
References a, b, c, EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, and folly::split().
TEST | ( | Split | , |
std_string_fixed | |||
) |
Definition at line 888 of file StringTest.cpp.
References a, b, c, EXPECT_EQ, EXPECT_FALSE, EXPECT_TRUE, folly::split(), and string.
TEST | ( | Split | , |
fixed_convert | |||
) |
Definition at line 931 of file StringTest.cpp.
References a, b, c, EXPECT_EQ, EXPECT_FALSE, EXPECT_NEAR, EXPECT_TRUE, and folly::split().
TEST | ( | Split | , |
fixed_convert_custom | |||
) |
Definition at line 1009 of file StringTest.cpp.
References my::Blue, EXPECT_EQ, EXPECT_THROW, EXPECT_TRUE, my::Red, and folly::split().
TEST | ( | String | , |
join | |||
) |
Definition at line 1019 of file StringTest.cpp.
References folly::empty(), EXPECT_EQ, EXPECT_TRUE, folly::join(), and gmock_output_test::output.
TEST | ( | String | , |
hexlify | |||
) |
Definition at line 1055 of file StringTest.cpp.
References folly::Range< Iter >::data(), EXPECT_EQ, EXPECT_TRUE, and folly::hexlify().
TEST | ( | String | , |
unhexlify | |||
) |
Definition at line 1074 of file StringTest.cpp.
References EXPECT_EQ, EXPECT_FALSE, EXPECT_THROW, EXPECT_TRUE, folly::basic_fbstring< E, T, A, Storage >::size(), and folly::unhexlify().
TEST | ( | String | , |
backslashify | |||
) |
Definition at line 1105 of file StringTest.cpp.
References folly::backslashify(), EXPECT_EQ, and string.
TEST | ( | String | , |
humanify | |||
) |
Definition at line 1117 of file StringTest.cpp.
References folly::Range< Iter >::begin(), EXPECT_EQ, folly::humanify(), i, folly::Range< Iter >::size(), and folly::toLowerAscii().
TEST | ( | String | , |
toLowerAsciiAligned | |||
) |
TEST | ( | String | , |
toLowerAsciiUnaligned | |||
) |
TEST | ( | String | , |
whitespace | |||
) |
Definition at line 1218 of file StringTest.cpp.
References EXPECT_EQ, folly::ltrimWhitespace(), folly::rtrimWhitespace(), and folly::trimWhitespace().
TEST | ( | String | , |
stripLeftMargin_really_empty | |||
) |
TEST | ( | String | , |
stripLeftMargin_empty | |||
) |
TEST | ( | String | , |
stripLeftMargin_only_whitespace | |||
) |
Definition at line 1272 of file StringTest.cpp.
References EXPECT_EQ, regex, and folly::stripLeftMargin().
TEST | ( | String | , |
stripLeftMargin_only_uneven_whitespace | |||
) |
Definition at line 1283 of file StringTest.cpp.
References EXPECT_EQ, regex, and folly::stripLeftMargin().
TEST | ( | String | , |
stripLeftMargin_one_line | |||
) |
TEST | ( | String | , |
stripLeftMargin_two_lines | |||
) |
TEST | ( | String | , |
stripLeftMargin_three_lines_uneven | |||
) |
TEST | ( | String | , |
stripLeftMargin_preceding_blank_lines | |||
) |
TEST | ( | String | , |
stripLeftMargin_succeeding_blank_lines | |||
) |
TEST | ( | String | , |
stripLeftMargin_interstitial_undented_whiteline | |||
) |
Definition at line 1343 of file StringTest.cpp.
References EXPECT_EQ, regex, and folly::stripLeftMargin().
TEST | ( | String | , |
stripLeftMargin_interstitial_dedented_whiteline | |||
) |
Definition at line 1356 of file StringTest.cpp.
References EXPECT_EQ, regex, and folly::stripLeftMargin().
TEST | ( | String | , |
stripLeftMargin_interstitial_equidented_whiteline | |||
) |
Definition at line 1369 of file StringTest.cpp.
References EXPECT_EQ, regex, and folly::stripLeftMargin().
TEST | ( | String | , |
stripLeftMargin_interstitial_indented_whiteline | |||
) |
Definition at line 1382 of file StringTest.cpp.
References EXPECT_EQ, regex, and folly::stripLeftMargin().
TEST | ( | String | , |
stripLeftMargin_no_pre_whitespace | |||
) |
Definition at line 1395 of file StringTest.cpp.
References EXPECT_EQ, regex, and folly::stripLeftMargin().
TEST | ( | String | , |
stripLeftMargin_no_post_whitespace | |||
) |
Definition at line 1407 of file StringTest.cpp.
References EXPECT_EQ, regex, and folly::stripLeftMargin().
void vprintfCheck | ( | const char * | expected, |
const char * | fmt, | ||
... | |||
) |
Definition at line 76 of file StringTest.cpp.
References EXPECT_EQ, prefix(), SCOPE_EXIT, string, folly::stringVAppendf(), and folly::stringVPrintf().
Referenced by TEST().
void vprintfError | ( | const char * | fmt, |
... | |||
) |
Definition at line 107 of file StringTest.cpp.
References EXPECT_THROW, SCOPE_EXIT, and folly::stringVPrintf().
Referenced by TEST().
PrettyTestCase prettyTestCases[] |
Definition at line 313 of file StringTest.cpp.