Skip to content

Commit

Permalink
quiche: do not use Http2String wrapper for std::string (#7856)
Browse files Browse the repository at this point in the history
Signed-off-by: Bence Béky <[email protected]>
  • Loading branch information
bencebeky authored and mattklein123 committed Aug 8, 2019
1 parent 3fdd00d commit c482279
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// porting layer for QUICHE.

#include <memory>
#include <string>

#include "extensions/quic_listeners/quiche/platform/flags_impl.h"

Expand All @@ -21,7 +22,6 @@
#include "quiche/http2/platform/api/http2_optional.h"
#include "quiche/http2/platform/api/http2_ptr_util.h"
#include "quiche/http2/platform/api/http2_reconstruct_object.h"
#include "quiche/http2/platform/api/http2_string.h"
#include "quiche/http2/platform/api/http2_string_piece.h"
#include "quiche/http2/test_tools/http2_random.h"

Expand Down Expand Up @@ -54,7 +54,7 @@ TEST(Http2PlatformTest, Http2Deque) {
}

TEST(Http2PlatformTest, Http2EstimateMemoryUsage) {
http2::Http2String s = "foo";
std::string s = "foo";
// Stubbed out to always return 0.
EXPECT_EQ(0, http2::Http2EstimateMemoryUsage(s));
}
Expand Down Expand Up @@ -108,13 +108,8 @@ TEST(Http2PlatformTest, Http2ReconstructObject) {
EXPECT_EQ("", s);
}

TEST(Http2PlatformTest, Http2String) {
http2::Http2String s = "foo";
EXPECT_EQ('o', s[1]);
}

TEST(Http2PlatformTest, Http2StringPiece) {
http2::Http2String s = "bar";
std::string s = "bar";
http2::Http2StringPiece sp(s);
EXPECT_EQ('b', sp[0]);
}
Expand Down

0 comments on commit c482279

Please sign in to comment.