Export of internal Abseil changes

--
1eb20c4802ccaa316ecebc237877210b77ac84f7 by Abseil Team <absl-team@google.com>:

Use constraint_values to detect windows.

This resolves ambiguous copts when cross compiling with LLVM on Windows.

PiperOrigin-RevId: 305935379

--
47c96948132a577b14642ad4c910052768c41d62 by Abseil Team <absl-team@google.com>:

Add StrSplit conversion tests for the swisstable containers.

PiperOrigin-RevId: 305747160

--
0daea0f78b50d49520bd6e67d093cd87d057bb86 by Abseil Team <absl-team@google.com>:

Typo fix: Removes duplicate word.

PiperOrigin-RevId: 305502962
GitOrigin-RevId: 1eb20c4802ccaa316ecebc237877210b77ac84f7
Change-Id: I1bfa0beda0260027a22bc671344cc8b74315b77a
This commit is contained in:
Abseil Team 2020-04-10 13:33:13 -07:00 committed by Gennadiy Rozental
parent 1112609635
commit bf6166a635
5 changed files with 23 additions and 5 deletions

View file

@ -44,9 +44,10 @@ config_setting(
config_setting(
name = "windows",
values = {
"cpu": "x64_windows",
},
constraint_values = [
"@bazel_tools//platforms:x86_64",
"@bazel_tools//platforms:windows",
],
visibility = [":__subpackages__"],
)

View file

@ -368,6 +368,8 @@ cc_test(
":strings",
"//absl/base:core_headers",
"//absl/base:dynamic_annotations",
"//absl/container:flat_hash_map",
"//absl/container:node_hash_map",
"@com_google_googletest//:gtest_main",
],
)

View file

@ -210,6 +210,8 @@ absl_cc_test(
absl::base
absl::core_headers
absl::dynamic_annotations
absl::flat_hash_map
absl::node_hash_map
gmock_main
)

View file

@ -634,8 +634,7 @@ class Cord {
// class so that we can isolate the bulk of cord.cc from changes
// to the representation.
//
// InlineRep holds either either a tree pointer, or an array of kMaxInline
// bytes.
// InlineRep holds either a tree pointer, or an array of kMaxInline bytes.
class InlineRep {
public:
static const unsigned char kMaxInline = 15;

View file

@ -29,6 +29,8 @@
#include "gtest/gtest.h"
#include "absl/base/dynamic_annotations.h" // for RunningOnValgrind
#include "absl/base/macros.h"
#include "absl/container/flat_hash_map.h"
#include "absl/container/node_hash_map.h"
#include "absl/strings/numbers.h"
namespace {
@ -421,6 +423,18 @@ TEST(Splitter, ConversionOperator) {
TestMapConversionOperator<std::multimap<std::string, std::string>>(splitter);
TestMapConversionOperator<std::unordered_map<std::string, std::string>>(
splitter);
TestMapConversionOperator<
absl::node_hash_map<absl::string_view, absl::string_view>>(splitter);
TestMapConversionOperator<
absl::node_hash_map<absl::string_view, std::string>>(splitter);
TestMapConversionOperator<
absl::node_hash_map<std::string, absl::string_view>>(splitter);
TestMapConversionOperator<
absl::flat_hash_map<absl::string_view, absl::string_view>>(splitter);
TestMapConversionOperator<
absl::flat_hash_map<absl::string_view, std::string>>(splitter);
TestMapConversionOperator<
absl::flat_hash_map<std::string, absl::string_view>>(splitter);
// Tests conversion to std::pair