Skip to content

Commit

Permalink
Fix ASAN.
Browse files Browse the repository at this point in the history
Signed-off-by: Harvey Tuch <htuch@google.com>
  • Loading branch information
htuch committed Aug 21, 2018
1 parent 36fd07a commit 3956490
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/common/http/header_map_impl_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -427,8 +427,10 @@ TEST(HeaderMapImplTest, SetRemovesAllValues) {
TEST(HeaderMapImplTest, DoubleInlineAdd) {
{
HeaderMapImpl headers;
headers.addReference(Headers::get().ContentLength, "foo");
headers.addReference(Headers::get().ContentLength, "bar");
const std::string foo("foo");
const std::string bar("bar");
headers.addReference(Headers::get().ContentLength, foo);
headers.addReference(Headers::get().ContentLength, bar);
EXPECT_STREQ("foo,bar", headers.ContentLength()->value().c_str());
EXPECT_EQ(1UL, headers.size());
}
Expand All @@ -448,7 +450,8 @@ TEST(HeaderMapImplTest, DoubleInlineAdd) {
}
{
HeaderMapImpl headers;
headers.addReference(Headers::get().ContentLength, "foo");
const std::string foo("foo");
headers.addReference(Headers::get().ContentLength, foo);
headers.addReferenceKey(Headers::get().ContentLength, 6);
EXPECT_STREQ("foo,6", headers.ContentLength()->value().c_str());
EXPECT_EQ(1UL, headers.size());
Expand Down

0 comments on commit 3956490

Please sign in to comment.