Fix QUIC core test display

Tests names will now display a pretty name instead of the test index.

For example new string is:
QuicStreamTests/QuicStreamTest.PendingStreamStaticness/Q048
as opposed to old:
QuicStreamTests/QuicStreamTest.PendingStreamStaticness/33

gfe-relnote: n/a, test-only
PiperOrigin-RevId: 269934211
Change-Id: I44552e9730c57e00a3829f5a15ba10d8af2dc207
diff --git a/quic/core/quic_arena_scoped_ptr_test.cc b/quic/core/quic_arena_scoped_ptr_test.cc
index 109fd37..5b7548a 100644
--- a/quic/core/quic_arena_scoped_ptr_test.cc
+++ b/quic/core/quic_arena_scoped_ptr_test.cc
@@ -21,6 +21,18 @@
   std::vector<char> buffer;
 };
 
+// Used by ::testing::PrintToStringParamName().
+std::string PrintToString(const TestParam& p) {
+  switch (p) {
+    case TestParam::kFromHeap:
+      return "heap";
+    case TestParam::kFromArena:
+      return "arena";
+  }
+  DCHECK(false);
+  return "?";
+}
+
 class QuicArenaScopedPtrParamTest : public QuicTestWithParam<TestParam> {
  protected:
   QuicArenaScopedPtr<TestObject> CreateObject(uintptr_t value) {
@@ -45,7 +57,8 @@
 INSTANTIATE_TEST_SUITE_P(QuicArenaScopedPtrParamTest,
                          QuicArenaScopedPtrParamTest,
                          testing::Values(TestParam::kFromHeap,
-                                         TestParam::kFromArena));
+                                         TestParam::kFromArena),
+                         ::testing::PrintToStringParamName());
 
 TEST_P(QuicArenaScopedPtrParamTest, NullObjects) {
   QuicArenaScopedPtr<TestObject> def;