Skip to content

Commit

Permalink
fixup: refcount test
Browse files Browse the repository at this point in the history
  • Loading branch information
shramov committed Dec 28, 2024
1 parent 67f9721 commit bc573a5
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions test/test_channel.cc
Original file line number Diff line number Diff line change
Expand Up @@ -650,9 +650,23 @@ TEST(Channel, DeleteLater)

c0->open();
ASSERT_NE(ctx.get("echo"), nullptr);
c0->process();
ASSERT_EQ(c0->state(), tll::state::Active);

c1->open();
ASSERT_EQ(c1->state(), tll::state::Active);
ASSERT_NE(ctx.get("zero"), nullptr);

c2->open();
ASSERT_EQ(ctx.get("null"), nullptr);
c2.release();

tll_msg_t msg = { .type = TLL_MESSAGE_DATA, .msgid = 10 };
ASSERT_EQ(c0->post(&msg), 0);
ASSERT_EQ(ctx.get("echo"), nullptr);
c0.release();

c1->process();
ASSERT_EQ(ctx.get("zero"), nullptr);
c1.release();
}

0 comments on commit bc573a5

Please sign in to comment.