Export of internal Abseil changes.
-- 855576faf9556573fd74c2874b290d8feb6565d5 by Gennadiy Rozental <rogeeff@google.com>: Import of CCTZ from GitHub. PiperOrigin-RevId: 241395451 -- b93bfd43eb2a992258f131e10f503526cfec6d48 by CJ Johnson <johnsoncj@google.com>: Fixes comment over AbslHashValue for InlinedVector PiperOrigin-RevId: 241368320 -- 75f58dafcac7d78c28d92a61ec7e53c5b3b86697 by Matt Kulukundis <kfm@google.com>: Do not call sampling logic for tables with custom allocators. PiperOrigin-RevId: 241356451 -- 09f1b4889476ff707a54189aff540e2fe1edcf61 by Derek Mauro <dmauro@google.com>: Re-enable optionalTest.InPlaceTSFINAEBug after libc++ update PiperOrigin-RevId: 241222673 -- 01a8bb5a8cb1e13e88ddb92f9c0160beb6e126be by Derek Mauro <dmauro@google.com>: Update Clang on Kokoro to r356196. This includes a workaround for a -Wgnu-include-next warning fixed by https://reviews.llvm.org/rG0706e144d57305782988dd4367530ae04986116f PiperOrigin-RevId: 241222395 -- 1de66bb669a7ec1494d6064677687f761ee2d369 by Abseil Team <absl-team@google.com>: Remove identical test and fix char to string per comment PiperOrigin-RevId: 240855512 GitOrigin-RevId: 855576faf9556573fd74c2874b290d8feb6565d5 Change-Id: Ie155b209ef5567e6597da6ef1844db7e2ad72586
This commit is contained in:
parent
2c8421e1c6
commit
93dfcf74cb
22 changed files with 96 additions and 43 deletions
|
|
@ -71,8 +71,8 @@ TEST(Split, TraitsTest) {
|
|||
// namespaces just like callers will need to use.
|
||||
TEST(Split, APIExamples) {
|
||||
{
|
||||
// Passes std::string delimiter. Assumes the default of Literal.
|
||||
std::vector<std::string> v = absl::StrSplit("a,b,c", ',');
|
||||
// Passes std::string delimiter. Assumes the default of ByString.
|
||||
std::vector<std::string> v = absl::StrSplit("a,b,c", ","); // NOLINT
|
||||
EXPECT_THAT(v, ElementsAre("a", "b", "c"));
|
||||
|
||||
// Equivalent to...
|
||||
|
|
@ -96,17 +96,6 @@ TEST(Split, APIExamples) {
|
|||
EXPECT_THAT(v, ElementsAre("a", "b", "c"));
|
||||
}
|
||||
|
||||
{
|
||||
// Same as above, but using std::string
|
||||
std::vector<std::string> v = absl::StrSplit("a,b,c", ',');
|
||||
EXPECT_THAT(v, ElementsAre("a", "b", "c"));
|
||||
|
||||
// Equivalent to...
|
||||
using absl::ByChar;
|
||||
v = absl::StrSplit("a,b,c", ByChar(','));
|
||||
EXPECT_THAT(v, ElementsAre("a", "b", "c"));
|
||||
}
|
||||
|
||||
{
|
||||
// Uses the Literal std::string "=>" as the delimiter.
|
||||
const std::vector<std::string> v = absl::StrSplit("a=>b=>c", "=>");
|
||||
|
|
@ -797,7 +786,7 @@ static bool IsFoundAt(absl::string_view text, Delimiter d, int expected_pos) {
|
|||
}
|
||||
|
||||
//
|
||||
// Tests for Literal
|
||||
// Tests for ByString
|
||||
//
|
||||
|
||||
// Tests using any delimiter that represents a single comma.
|
||||
|
|
@ -817,7 +806,7 @@ void TestComma(Delimiter d) {
|
|||
EXPECT_FALSE(IsFoundAt(";", d, -1));
|
||||
}
|
||||
|
||||
TEST(Delimiter, Literal) {
|
||||
TEST(Delimiter, ByString) {
|
||||
using absl::ByString;
|
||||
TestComma(ByString(","));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue