Export of internal Abseil changes
-- ea0cfebeb69b25bec343652bbe1a203f5476c51a by Mark Barolak <mbar@google.com>: Change "std::string" to "string" in places where a "std::" qualification was incorrectly inserted by automation. PiperOrigin-RevId: 300108520 GitOrigin-RevId: ea0cfebeb69b25bec343652bbe1a203f5476c51a Change-Id: Ie3621e63a6ebad67b9fe56a3ebe33e1d50dac602
This commit is contained in:
parent
d936052d32
commit
a877af1f29
68 changed files with 191 additions and 191 deletions
|
@ -2132,11 +2132,11 @@ TEST(Btree, UserProvidedKeyCompareToComparators) {
|
|||
TEST(Btree, TryEmplaceBasicTest) {
|
||||
absl::btree_map<int, std::string> m;
|
||||
|
||||
// Should construct a std::string from the literal.
|
||||
// Should construct a string from the literal.
|
||||
m.try_emplace(1, "one");
|
||||
EXPECT_EQ(1, m.size());
|
||||
|
||||
// Try other std::string constructors and const lvalue key.
|
||||
// Try other string constructors and const lvalue key.
|
||||
const int key(42);
|
||||
m.try_emplace(key, 3, 'a');
|
||||
m.try_emplace(2, std::string("two"));
|
||||
|
|
|
@ -83,7 +83,7 @@ int GetNonShortStringOptimizationSize() {
|
|||
}
|
||||
ABSL_RAW_LOG(
|
||||
FATAL,
|
||||
"Failed to find a std::string larger than the short std::string optimization");
|
||||
"Failed to find a string larger than the short string optimization");
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
@ -780,7 +780,7 @@ TEST(IntVec, Reserve) {
|
|||
TEST(StringVec, SelfRefPushBack) {
|
||||
std::vector<std::string> std_v;
|
||||
absl::InlinedVector<std::string, 4> v;
|
||||
const std::string s = "A quite long std::string to ensure heap.";
|
||||
const std::string s = "A quite long string to ensure heap.";
|
||||
std_v.push_back(s);
|
||||
v.push_back(s);
|
||||
for (int i = 0; i < 20; ++i) {
|
||||
|
@ -795,7 +795,7 @@ TEST(StringVec, SelfRefPushBack) {
|
|||
TEST(StringVec, SelfRefPushBackWithMove) {
|
||||
std::vector<std::string> std_v;
|
||||
absl::InlinedVector<std::string, 4> v;
|
||||
const std::string s = "A quite long std::string to ensure heap.";
|
||||
const std::string s = "A quite long string to ensure heap.";
|
||||
std_v.push_back(s);
|
||||
v.push_back(s);
|
||||
for (int i = 0; i < 20; ++i) {
|
||||
|
@ -808,7 +808,7 @@ TEST(StringVec, SelfRefPushBackWithMove) {
|
|||
}
|
||||
|
||||
TEST(StringVec, SelfMove) {
|
||||
const std::string s = "A quite long std::string to ensure heap.";
|
||||
const std::string s = "A quite long string to ensure heap.";
|
||||
for (int len = 0; len < 20; len++) {
|
||||
SCOPED_TRACE(len);
|
||||
absl::InlinedVector<std::string, 8> v;
|
||||
|
|
|
@ -186,7 +186,7 @@ struct key_compare_to_adapter<std::greater<absl::Cord>> {
|
|||
template <typename Key, typename Compare, typename Alloc, int TargetNodeSize,
|
||||
bool Multi, typename SlotPolicy>
|
||||
struct common_params {
|
||||
// If Compare is a common comparator for a std::string-like type, then we adapt it
|
||||
// If Compare is a common comparator for a string-like type, then we adapt it
|
||||
// to use heterogeneous lookup and to be a key-compare-to comparator.
|
||||
using key_compare = typename key_compare_to_adapter<Compare>::type;
|
||||
// A type which indicates if we have a key-compare-to functor or a plain old
|
||||
|
|
|
@ -277,11 +277,11 @@ TEST(CompressedTupleTest, Nested) {
|
|||
|
||||
TEST(CompressedTupleTest, Reference) {
|
||||
int i = 7;
|
||||
std::string s = "Very long std::string that goes in the heap";
|
||||
std::string s = "Very long string that goes in the heap";
|
||||
CompressedTuple<int, int&, std::string, std::string&> x(i, i, s, s);
|
||||
|
||||
// Sanity check. We should have not moved from `s`
|
||||
EXPECT_EQ(s, "Very long std::string that goes in the heap");
|
||||
EXPECT_EQ(s, "Very long string that goes in the heap");
|
||||
|
||||
EXPECT_EQ(x.get<0>(), x.get<1>());
|
||||
EXPECT_NE(&x.get<0>(), &x.get<1>());
|
||||
|
|
|
@ -1666,9 +1666,9 @@ TEST(Nodes, EmptyNodeType) {
|
|||
}
|
||||
|
||||
TEST(Nodes, ExtractInsert) {
|
||||
constexpr char k0[] = "Very long std::string zero.";
|
||||
constexpr char k1[] = "Very long std::string one.";
|
||||
constexpr char k2[] = "Very long std::string two.";
|
||||
constexpr char k0[] = "Very long string zero.";
|
||||
constexpr char k1[] = "Very long string one.";
|
||||
constexpr char k2[] = "Very long string two.";
|
||||
StringTable t = {{k0, ""}, {k1, ""}, {k2, ""}};
|
||||
EXPECT_THAT(t,
|
||||
UnorderedElementsAre(Pair(k0, ""), Pair(k1, ""), Pair(k2, "")));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue