Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Unified Diff: net/quic/platform/impl/quic_test_impl.cc

Issue 2848203002: Add a platform implementation of QuicTest and QuicTestWithParam (Closed)
Patch Set: net/quic/platform/impl/quic_test_impl.cc Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/platform/impl/quic_test_impl.h ('k') | net/quic/quartc/quartc_session_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/platform/impl/quic_test_impl.cc
diff --git a/net/quic/platform/impl/quic_test_impl.cc b/net/quic/platform/impl/quic_test_impl.cc
new file mode 100644
index 0000000000000000000000000000000000000000..dc1709b2856ccd99c13719faeda1e4be49409c02
--- /dev/null
+++ b/net/quic/platform/impl/quic_test_impl.cc
@@ -0,0 +1,23 @@
+// Copyright (c) 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "net/quic/platform/impl/quic_test_impl.h"
+
+#include "base/logging.h"
+#include "net/quic/platform/api/quic_flags.h"
+
+QuicFlagSaver::QuicFlagSaver() {
+#define QUIC_FLAG(type, flag, value) \
+ CHECK_EQ(value, flag) \
+ << "Flag set to an unexpected value. A prior test is likely " \
+ << "setting a flag without using a QuicFlagSaver";
+#include "net/quic/core/quic_flags_list.h"
+#undef QUIC_FLAG
+}
+
+QuicFlagSaver::~QuicFlagSaver() {
+#define QUIC_FLAG(type, flag, value) flag = value;
+#include "net/quic/core/quic_flags_list.h"
+#undef QUIC_FLAG
+}
« no previous file with comments | « net/quic/platform/impl/quic_test_impl.h ('k') | net/quic/quartc/quartc_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698