aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/support/reference_counted_test.cc
diff options
context:
space:
mode:
authorGravatar Mark D. Roth <roth@google.com>2017-11-28 08:24:10 -0800
committerGravatar Mark D. Roth <roth@google.com>2017-11-28 08:24:10 -0800
commitabadc6c5168f9429173751f1fb4ed225942d6f8c (patch)
treef94772a2a7be1ad27be227fb4cc72312cac0531b /test/core/support/reference_counted_test.cc
parent70db663ae8773dc45464c904603a3e73045b45c5 (diff)
Use New() and Delete() instead of C++ new and delete.
Diffstat (limited to 'test/core/support/reference_counted_test.cc')
-rw-r--r--test/core/support/reference_counted_test.cc7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/core/support/reference_counted_test.cc b/test/core/support/reference_counted_test.cc
index 119fc1b600..6613f06585 100644
--- a/test/core/support/reference_counted_test.cc
+++ b/test/core/support/reference_counted_test.cc
@@ -17,7 +17,10 @@
*/
#include "src/core/lib/support/reference_counted.h"
+
#include <gtest/gtest.h>
+
+#include "src/core/lib/support/memory.h"
#include "test/core/util/test_config.h"
namespace grpc_core {
@@ -39,12 +42,12 @@ TEST(ReferenceCounted, StackAllocatedWithExtraRef) {
}
TEST(ReferenceCounted, HeapAllocated) {
- Foo* foo = new Foo();
+ Foo* foo = New<Foo>();
foo->Unref();
}
TEST(ReferenceCounted, HeapAllocatedWithExtraRef) {
- Foo* foo = new Foo();
+ Foo* foo = New<Foo>();
foo->Ref();
foo->Unref();
foo->Unref();