1*6c7fed4cSGilbert Chen #include "platform-mc/terminus.hpp" 2*6c7fed4cSGilbert Chen 3*6c7fed4cSGilbert Chen #include <gtest/gtest.h> 4*6c7fed4cSGilbert Chen 5*6c7fed4cSGilbert Chen TEST(TerminusTest, supportedTypeTest) 6*6c7fed4cSGilbert Chen { 7*6c7fed4cSGilbert Chen auto t1 = pldm::platform_mc::Terminus(1, 1 << PLDM_BASE); 8*6c7fed4cSGilbert Chen auto t2 = pldm::platform_mc::Terminus(2, 9*6c7fed4cSGilbert Chen 1 << PLDM_BASE | 1 << PLDM_PLATFORM); 10*6c7fed4cSGilbert Chen 11*6c7fed4cSGilbert Chen EXPECT_EQ(true, t1.doesSupportType(PLDM_BASE)); 12*6c7fed4cSGilbert Chen EXPECT_EQ(false, t1.doesSupportType(PLDM_PLATFORM)); 13*6c7fed4cSGilbert Chen EXPECT_EQ(true, t2.doesSupportType(PLDM_BASE)); 14*6c7fed4cSGilbert Chen EXPECT_EQ(true, t2.doesSupportType(PLDM_PLATFORM)); 15*6c7fed4cSGilbert Chen } 16*6c7fed4cSGilbert Chen 17*6c7fed4cSGilbert Chen TEST(TerminusTest, getTidTest) 18*6c7fed4cSGilbert Chen { 19*6c7fed4cSGilbert Chen const pldm_tid_t tid = 1; 20*6c7fed4cSGilbert Chen auto t1 = pldm::platform_mc::Terminus(tid, 1 << PLDM_BASE); 21*6c7fed4cSGilbert Chen 22*6c7fed4cSGilbert Chen EXPECT_EQ(tid, t1.getTid()); 23*6c7fed4cSGilbert Chen } 24