Changes imported from Abseil "staging" branch:

- 06abebb2bdb201c572da209fc7f781d6bd774d6b Documentation fixes for `absl::optional`. by Abseil Team <absl-team@google.com>
  - 42adc4c4daade2e070dc337e94d8851a1fd4bead  Rolling back the previous change because `__has_warning`... by Xiaoyi Zhang <zhangxy@google.com>
  - 02a42cbaa97d82ee7942bc498538359185d75087 Remove literal UTF8 strings in abseil code to avoid file ... by Jon Cohen <cohenjon@google.com>

GitOrigin-RevId: 06abebb2bdb201c572da209fc7f781d6bd774d6b
Change-Id: I4f4659c2e7ca6fc585b6c089bcf20ca61aced75d
This commit is contained in:
Abseil Team 2018-01-31 20:34:59 -08:00 committed by jueminyang
parent 8a401394b8
commit 0ec11bad6f
7 changed files with 27 additions and 39 deletions

View file

@ -684,8 +684,11 @@ TEST(StringViewTest, TruncSubstr) {
}
TEST(StringViewTest, UTF8) {
EXPECT_EQ(strlen("á"), absl::string_view("á á").find_first_of(" "));
EXPECT_EQ(strlen("á"), absl::string_view("á á").find_first_of(" \t"));
std::string utf8 = "\u00E1";
std::string utf8_twice = utf8 + " " + utf8;
int utf8_len = strlen(utf8.data());
EXPECT_EQ(utf8_len, absl::string_view(utf8_twice).find_first_of(" "));
EXPECT_EQ(utf8_len, absl::string_view(utf8_twice).find_first_of(" \t"));
}
TEST(StringViewTest, FindConformance) {