EXPECT_TRUE(true);
}
+
+class DSInputDeviceTest : public ::testing::Test
+{
+public:
+ void SetUp(void) override
+ {}
+ void TearDown(void) override
+ {}
+};
+
+TEST_F(DSInputDeviceTest, NewDSInputDevice)
+{
+ DSInputDevice *inputDevice = new DSInputDevice;
+ delete inputDevice;
+ inputDevice = new DSInputDevice("TestDevice", "virtual-0", DSInput::NoneClass, DSInput::NoneSubclass);
+ delete inputDevice;
+ ASSERT_TRUE(true);
+}
+
+TEST_F(DSInputDeviceTest, DSInputDeviceSetGetName)
+{
+ std::string tName = "TestDevice";
+ DSInputDevice *inputDevice = new DSInputDevice;
+ inputDevice->setName(tName);
+ std::string name = inputDevice->getName();
+ EXPECT_TRUE(name.compare(tName) == 0);
+ delete inputDevice;
+}
+
+TEST_F(DSInputDeviceTest, DSInputDeviceSetGetIdentifier)
+{
+ std::string tIdentifier = "virtual-0";
+ DSInputDevice *inputDevice = new DSInputDevice;
+ inputDevice->setIdentifier(tIdentifier);
+ std::string identifier = inputDevice->getIdentifier();
+ EXPECT_TRUE(identifier.compare(tIdentifier) == 0);
+ delete inputDevice;
+}
+
+TEST_F(DSInputDeviceTest, DSInputDeviceSetGetClass)
+{
+ DSInput::DeviceClass tDevClass;
+ DSInput::DeviceClass devClass;
+ DSInputDevice *inputDevice = new DSInputDevice;
+
+ tDevClass = DSInput::PointerClass;
+ inputDevice->setClass(tDevClass);
+ devClass = inputDevice->getClass();
+ EXPECT_TRUE(tDevClass == devClass);
+
+ tDevClass = DSInput::KeyboardClass;
+ inputDevice->setClass(tDevClass);
+ devClass = inputDevice->getClass();
+ EXPECT_TRUE(tDevClass == devClass);
+
+ tDevClass = DSInput::TouchClass;
+ inputDevice->setClass(tDevClass);
+ devClass = inputDevice->getClass();
+ EXPECT_TRUE(tDevClass == devClass);
+
+ delete inputDevice;
+}
+
+TEST_F(DSInputDeviceTest, DSInputDeviceSetGetSubclass)
+{
+ DSInput::DeviceSubclass tDevSubclass;
+ DSInputDevice *inputDevice = new DSInputDevice;
+
+ tDevSubclass = DSInput::NoneSubclass;
+ inputDevice->setSubclass(tDevSubclass);
+ DSInput::DeviceSubclass devSubclass = inputDevice->getSubclass();
+ EXPECT_TRUE(tDevSubclass == devSubclass);
+
+ delete inputDevice;
+}
+