summaryrefslogtreecommitdiff
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2012-07-20 20:34:34 +0200
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2012-07-20 20:34:34 +0200
commiteedc3e67a59761d33bdad8953cc87537d5a5d5b4 (patch)
tree8a57a11644b8429c1dde2733120dc6e3bbff3aa9
parentf6a0da4d1f771b60e11ddd4a54dfd5a1e0f2bdf1 (diff)
test_edge_barrier_controller: add test for sticky edge property
(bzr r2509.1.29)
-rw-r--r--tests/test_edge_barrier_controller.cpp18
1 files changed, 17 insertions, 1 deletions
diff --git a/tests/test_edge_barrier_controller.cpp b/tests/test_edge_barrier_controller.cpp
index ddbcb37de..fb7fbe421 100644
--- a/tests/test_edge_barrier_controller.cpp
+++ b/tests/test_edge_barrier_controller.cpp
@@ -76,6 +76,7 @@ public:
virtual void SetUp()
{
bc.options = std::make_shared<launcher::Options>();
+ bc.options()->edge_resist = true;
bc.options()->edge_passed_disabled_ms = 150;
for (int i = 0; i < max_num_monitors; ++i)
@@ -97,7 +98,7 @@ public:
TEST_F(TestEdgeBarrierController, Construction)
{
- EXPECT_FALSE(bc.sticky_edges);
+ EXPECT_TRUE(bc.sticky_edges);
}
TEST_F(TestEdgeBarrierController, ProcessHandledEvent)
@@ -206,4 +207,19 @@ TEST_F(TestEdgeBarrierController, BreakingEdgeDontReleasesBarrierForHandledEvent
bc.ProcessBarrierEvent(&owner, MakeBarrierEvent(6, true));
}
+TEST_F(TestEdgeBarrierController, StickyEdgePropertyProxiesLauncherOption)
+{
+ bc.options()->edge_resist = false;
+ EXPECT_FALSE(bc.sticky_edges());
+
+ bc.options()->edge_resist = true;
+ EXPECT_TRUE(bc.sticky_edges());
+
+ bc.sticky_edges = false;
+ EXPECT_FALSE(bc.options()->edge_resist());
+
+ bc.sticky_edges = true;
+ EXPECT_TRUE(bc.options()->edge_resist());
+}
+
}