From 588af679a637354f424f925aad18ac54e5e49bcc Mon Sep 17 00:00:00 2001 From: tshino Date: Tue, 23 Jan 2024 01:22:35 +0900 Subject: [PATCH] Add tests for IsConnected() --- tests/core_tests/SenderAPITest.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/core_tests/SenderAPITest.cpp b/tests/core_tests/SenderAPITest.cpp index 6a84c05..ccdf54f 100644 --- a/tests/core_tests/SenderAPITest.cpp +++ b/tests/core_tests/SenderAPITest.cpp @@ -356,6 +356,19 @@ TEST(SenderIsConnected, ReturnsFalseIfNotConnectedEver) sender::DeleteCamera(handle); } +TEST(SenderIsConnected, ReturnsTrueIfAlreadyConnected) +{ + auto handle = sender::CreateCamera(320, 240); + + auto fb = sc::FrameBuffer::open(); + ASSERT_TRUE( fb ); + + bool ret = sender::IsConnected(handle); + + EXPECT_EQ( ret, true ); + sender::DeleteCamera(handle); +} + // TODO: tests for IsConnected } //namespace SenderAPITest