Skip to content

Commit

Permalink
unit-tests updates after removing exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Aleksandr Kuzin authored and sedovmo committed Nov 25, 2024
1 parent a75c0d7 commit f2fb754
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion asam_cmp_capture_module/tests/test_capture_fb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ TEST_F(CaptureFbTest, TestInterfacesShareSameStreamId)
streamId10 = streamFb10.getPropertyValue("StreamId");

EXPECT_NE(streamId00, streamId01);
EXPECT_THROW(streamFb00.setPropertyValue("StreamId", streamId01), std::runtime_error);
streamFb00.setPropertyValue("StreamId", streamId01);
streamId00 = streamFb00.getPropertyValue("StreamId");
EXPECT_NE(streamId00, streamId01);

Expand Down
8 changes: 4 additions & 4 deletions asam_cmp_capture_module/tests/test_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ TEST_F(InterfaceFbTest, TestSetId)
uint32_t id1 = itf1.getPropertyValue("InterfaceId"), id2 = itf2.getPropertyValue("InterfaceId");
ASSERT_NE(id1, id2);

EXPECT_THROW(itf2.setPropertyValue("InterfaceId", id1), std::runtime_error);
itf2.setPropertyValue("InterfaceId", id1);
ASSERT_EQ(itf2.getPropertyValue("InterfaceId"), id2);

itf2.setPropertyValue("InterfaceId", static_cast<uint64_t>(std::numeric_limits<uint32_t>::max()) + 1);
Expand All @@ -100,7 +100,7 @@ TEST_F(InterfaceFbTest, TestSetId)
std::this_thread::sleep_for(std::chrono::milliseconds(50));
ASSERT_EQ(itf2.getPropertyValue("InterfaceId"), id2 + 1);

EXPECT_THROW(itf2.setPropertyValue("InterfaceId", id1), std::runtime_error);
itf2.setPropertyValue("InterfaceId", id1);
ASSERT_EQ(itf2.getPropertyValue("InterfaceId"), id2 + 1);

itf2.setPropertyValue("InterfaceId", static_cast<uint64_t>(std::numeric_limits<uint32_t>::max()) + 1);
Expand Down Expand Up @@ -163,7 +163,7 @@ TEST_F(InterfaceFbTest, TestBeginUpdateEndUpdateWithWrongId)

ASSERT_EQ(interfaceFb.getPropertyValue("InterfaceId"), oldInterfaceId);
ASSERT_EQ(interfaceFb.getPropertyValue("PayloadType"), oldPayloadType);
EXPECT_THROW(interfaceFb.endUpdate(), std::runtime_error);
interfaceFb.endUpdate();

ASSERT_EQ(interfaceFb.getPropertyValue("InterfaceId"), oldInterfaceId);
ASSERT_EQ(interfaceFb.getPropertyValue("PayloadType"), payloadType);
Expand All @@ -183,7 +183,7 @@ TEST_F(InterfaceFbTest, TestStreamManager)
FunctionBlockPtr stream2 = interfaceFb.getFunctionBlocks().getItemAt(1);
size_t id2 = stream2.getPropertyValue("StreamId");

EXPECT_THROW(stream2.setPropertyValue("StreamId", id1), std::runtime_error);
stream2.setPropertyValue("StreamId", id1);
ASSERT_EQ(stream2.getPropertyValue("StreamId"), id2);

size_t id3 = 47;
Expand Down

0 comments on commit f2fb754

Please sign in to comment.