aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core
diff options
context:
space:
mode:
authorGravatar Soheil Hassas Yeganeh <soheil@google.com>2018-11-30 13:40:12 -0500
committerGravatar Soheil Hassas Yeganeh <soheil@google.com>2018-12-01 23:42:18 -0500
commit4345ef121a3422bd5de4d99bd758e4fd8567680d (patch)
tree8c0440cb2ccdbe3c3d0a059f144711a7e9de7596 /test/core
parent5fed8e54528ca94213fec7038f56d9db91709c33 (diff)
Add debug-only tracing to grpc_core::RefCount
Also, this patch removes the *WithTracing variants in favor of the new API.
Diffstat (limited to 'test/core')
-rw-r--r--test/core/gprpp/orphanable_test.cc4
-rw-r--r--test/core/gprpp/ref_counted_ptr_test.cc4
-rw-r--r--test/core/gprpp/ref_counted_test.cc9
3 files changed, 8 insertions, 9 deletions
diff --git a/test/core/gprpp/orphanable_test.cc b/test/core/gprpp/orphanable_test.cc
index 546f395cef..fe13df0d0d 100644
--- a/test/core/gprpp/orphanable_test.cc
+++ b/test/core/gprpp/orphanable_test.cc
@@ -83,11 +83,11 @@ TEST(OrphanablePtr, InternallyRefCounted) {
// things build properly in both debug and non-debug cases.
DebugOnlyTraceFlag baz_tracer(true, "baz");
-class Baz : public InternallyRefCountedWithTracing<Baz> {
+class Baz : public InternallyRefCounted<Baz> {
public:
Baz() : Baz(0) {}
explicit Baz(int value)
- : InternallyRefCountedWithTracing<Baz>(&baz_tracer), value_(value) {}
+ : InternallyRefCounted<Baz>(&baz_tracer), value_(value) {}
void Orphan() override { Unref(); }
int value() const { return value_; }
diff --git a/test/core/gprpp/ref_counted_ptr_test.cc b/test/core/gprpp/ref_counted_ptr_test.cc
index 512687eb67..96dbdf884b 100644
--- a/test/core/gprpp/ref_counted_ptr_test.cc
+++ b/test/core/gprpp/ref_counted_ptr_test.cc
@@ -163,9 +163,9 @@ TEST(MakeRefCounted, Args) {
TraceFlag foo_tracer(true, "foo");
-class FooWithTracing : public RefCountedWithTracing<FooWithTracing> {
+class FooWithTracing : public RefCounted<FooWithTracing> {
public:
- FooWithTracing() : RefCountedWithTracing(&foo_tracer) {}
+ FooWithTracing() : RefCounted(&foo_tracer) {}
};
TEST(RefCountedPtr, RefCountedWithTracing) {
diff --git a/test/core/gprpp/ref_counted_test.cc b/test/core/gprpp/ref_counted_test.cc
index 5aba1634ef..1955be3311 100644
--- a/test/core/gprpp/ref_counted_test.cc
+++ b/test/core/gprpp/ref_counted_test.cc
@@ -74,9 +74,9 @@ TEST(RefCountedNonPolymorphic, ExtraRef) {
// things build properly in both debug and non-debug cases.
DebugOnlyTraceFlag foo_tracer(true, "foo");
-class FooWithTracing : public RefCountedWithTracing<FooWithTracing> {
+class FooWithTracing : public RefCounted<FooWithTracing> {
public:
- FooWithTracing() : RefCountedWithTracing(&foo_tracer) {}
+ FooWithTracing() : RefCounted(&foo_tracer) {}
};
TEST(RefCountedWithTracing, Basic) {
@@ -92,10 +92,9 @@ TEST(RefCountedWithTracing, Basic) {
}
class FooNonPolymorphicWithTracing
- : public RefCountedWithTracing<FooNonPolymorphicWithTracing,
- NonPolymorphicRefCount> {
+ : public RefCounted<FooNonPolymorphicWithTracing, NonPolymorphicRefCount> {
public:
- FooNonPolymorphicWithTracing() : RefCountedWithTracing(&foo_tracer) {}
+ FooNonPolymorphicWithTracing() : RefCounted(&foo_tracer) {}
};
TEST(RefCountedNonPolymorphicWithTracing, Basic) {