aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/support/reference_counted_test.cc
diff options
context:
space:
mode:
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();