Move EXPECT_EQ macro magic from quic/platform to quiche/platform.

The purpose of this machinary is to override EXPECT_EQ and similar comparison
macros so that -Wsigned-compare actually catches signed-unsigned comparison in
internal builds (where gTest implementation is slightly different so otherwise
the warning would not be effective).  This CL moves it from
quic/platform/api/quic_test.h to quiche/common/platform/quiche_test.h, while
also adding an include of the latter to the former, to make users of either
header benefit from it.

The change to frame_formatter_test.cc is necessary to avoid the following
error:

third_party/http2/tools/frame_formatter_test.cc:75:3: error: non-const lvalue reference to type 'basic_string<...>' cannot bind to a temporary of type 'basic_string<...>'
  EXPECT_EQ("\x01 a", std::move(status_or_parsed).value());
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./third_party/quiche/common/platform/impl/quiche_test_impl.h:73:3: note: expanded from macro 'EXPECT_EQ'
  QUIC_LOGGING_INTERNAL_EXPECT_EXT(EqHelper::Compare, ==, val1, val2)
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./third_party/quiche/common/platform/impl/quiche_test_impl.h:68:3: note: expanded from macro 'QUIC_LOGGING_INTERNAL_EXPECT_EXT'
  QUIC_LOGGING_INTERNAL_INNER_COMPARE(_comparison_symbol, _val1, _val2);     \
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./net/quic/platform_overrides/quiche_platform_impl/quiche_logging_impl.h:164:30: note: expanded from macro 'QUIC_LOGGING_INTERNAL_INNER_COMPARE'
      const decltype(_val2)& _local_val2 = (_val2);                           \

PiperOrigin-RevId: 390165392
1 file changed
tree: a8d502ace1a0c773675378d1188418512122155d
  1. common/
  2. epoll_server/
  3. http2/
  4. quic/
  5. spdy/
  6. CONTRIBUTING.md
  7. LICENSE
  8. README.md
README.md

QUICHE

QUICHE stands for QUIC, Http/2, Etc. It is Google‘s production-ready implementation of QUIC, HTTP/2, HTTP/3, and related protocols and tools. It powers Google’s servers, Chromium, Envoy, and other projects. It is actively developed and maintained.

There are two public QUICHE repositories. Either one may be used by embedders, as they are automatically kept in sync:

To embed QUICHE in your project, platform APIs need to be implemented and build files need to be created. Note that it is on the QUICHE team's roadmap to include default implementation for all platform APIs and to open-source build files. In the meanwhile, take a look at open source embedders like Chromium and Envoy to get started:

QUICHE is only supported on little-endian platforms.