test: message: read: add test for unix_fd
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I602b3d2d44dbd74916aa73d018b37ff0cafb210d
diff --git a/test/message/read.cpp b/test/message/read.cpp
index 42df2af..7944330 100644
--- a/test/message/read.cpp
+++ b/test/message/read.cpp
@@ -159,6 +159,15 @@
EXPECT_EQ(s, ret.str);
}
+TEST_F(ReadTest, UnixFd)
+{
+ const int fd = 42;
+ expect_basic<int>(SD_BUS_TYPE_UNIX_FD, fd);
+ sdbusplus::message::unix_fd ret;
+ new_message().read(ret);
+ EXPECT_EQ(fd, ret);
+}
+
TEST_F(ReadTest, CombinedBasic)
{
const double a = 2.2;