--- /dev/null
+#include "libds-tests.h"
+#include "DSZone.h"
+#include "DSPolicyArea.h"
+#include "DSPolicyAreaPrivate.h"
+
+using namespace display_server;
+
+class DSZoneTest : public ::testing::Test
+{
+public:
+ void SetUp(void) override
+ {}
+ void TearDown(void) override
+ {}
+};
+
+TEST_F(DSZoneTest, NewDSZone)
+{
+ auto policyArea = std::make_shared<DSPolicyArea>();
+ auto zone = std::make_unique<DSZone>(policyArea);
+ EXPECT_TRUE(zone != nullptr);
+}
+
+TEST_F(DSZoneTest, BasicMethods)
+{
+ auto policyArea = std::make_shared<DSPolicyArea>();
+ EXPECT_TRUE(policyArea->setPosition(10, 10) == true);
+ EXPECT_TRUE(policyArea->setSize(100, 100) == true);
+
+ auto zone = std::make_unique<DSZone>(policyArea);
+ EXPECT_TRUE(zone != nullptr);
+
+ EXPECT_TRUE(zone->getX() == 10);
+ EXPECT_TRUE(zone->getY() == 10);
+ EXPECT_TRUE(zone->getWidth() == 100);
+ EXPECT_TRUE(zone->getHeight() == 100);
+}
'DSWaylandPointer-test.cpp',
'DSWaylandKeyboard-test.cpp',
'DSWaylandTouch-test.cpp',
+ 'DSZone-test.cpp'
]
gmock_dep = dependency('gmock', method : 'pkg-config')