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

Unified Diff: net/quic/core/quic_one_block_arena_test.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/core/quic_headers_stream_test.cc ('k') | net/quic/core/quic_packet_creator_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_one_block_arena_test.cc
diff --git a/net/quic/core/quic_one_block_arena_test.cc b/net/quic/core/quic_one_block_arena_test.cc
index 2a81c219b96ac2530dd572e25c76d152a197bbb0..54a73e59ccabb9eea0e92e9c74ee089dec6b2833 100644
--- a/net/quic/core/quic_one_block_arena_test.cc
+++ b/net/quic/core/quic_one_block_arena_test.cc
@@ -7,9 +7,8 @@
#include <cstdint>
#include "net/quic/platform/api/quic_containers.h"
+#include "net/quic/platform/api/quic_test.h"
#include "net/quic/test_tools/quic_test_utils.h"
-#include "testing/gmock/include/gmock/gmock.h"
-#include "testing/gtest/include/gtest/gtest.h"
namespace net {
namespace {
@@ -20,13 +19,15 @@ struct TestObject {
uint32_t value;
};
-TEST(QuicOneBlockArenaTest, AllocateSuccess) {
+class QuicOneBlockArenaTest : public QuicTest {};
+
+TEST_F(QuicOneBlockArenaTest, AllocateSuccess) {
QuicOneBlockArena<1024> arena;
QuicArenaScopedPtr<TestObject> ptr = arena.New<TestObject>();
EXPECT_TRUE(ptr.is_from_arena());
}
-TEST(QuicOneBlockArenaTest, Exhaust) {
+TEST_F(QuicOneBlockArenaTest, Exhaust) {
QuicOneBlockArena<1024> arena;
for (size_t i = 0; i < 1024 / kMaxAlign; ++i) {
QuicArenaScopedPtr<TestObject> ptr = arena.New<TestObject>();
@@ -38,7 +39,7 @@ TEST(QuicOneBlockArenaTest, Exhaust) {
EXPECT_FALSE(ptr.is_from_arena());
}
-TEST(QuicOneBlockArenaTest, NoOverlaps) {
+TEST_F(QuicOneBlockArenaTest, NoOverlaps) {
QuicOneBlockArena<1024> arena;
std::vector<QuicArenaScopedPtr<TestObject>> objects;
QuicIntervalSet<uintptr_t> used;
« no previous file with comments | « net/quic/core/quic_headers_stream_test.cc ('k') | net/quic/core/quic_packet_creator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698