aboutsummaryrefslogtreecommitdiff
path: root/tests/unit
diff options
context:
space:
mode:
authorRobert Tari <robert@tari.in>2021-08-12 21:03:34 +0200
committerRobert Tari <robert@tari.in>2021-08-12 21:15:38 +0200
commite66c68e2420ed2e2b4ce531dea46dc04b3db297b (patch)
tree702bd2bc84523c6949042d98de7413261af87455 /tests/unit
parent7db2204cc52bfc30fe40d22b69239b8fb6c3cd11 (diff)
downloadayatana-indicator-display-e66c68e2420ed2e2b4ce531dea46dc04b3db297b.tar.gz
ayatana-indicator-display-e66c68e2420ed2e2b4ce531dea46dc04b3db297b.tar.bz2
ayatana-indicator-display-e66c68e2420ed2e2b4ce531dea46dc04b3db297b.zip
Fix failing build
- src/rotation-lock.cpp: Fix double declaration of create_desktop_menu - tests/CMakeLists.txt: Add uninitDerivedMemberVar and unmatchedSuppression suppressions to cppcheck - tests/unit/rotation-lock-test.cpp: Fix and expand test fixes https://github.com/AyatanaIndicators/ayatana-indicator-display/issues/24
Diffstat (limited to 'tests/unit')
-rw-r--r--tests/unit/rotation-lock-test.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/unit/rotation-lock-test.cpp b/tests/unit/rotation-lock-test.cpp
index a5a6f6c..a4ce388 100644
--- a/tests/unit/rotation-lock-test.cpp
+++ b/tests/unit/rotation-lock-test.cpp
@@ -53,9 +53,12 @@ TEST_F(RotationLockFixture, CheckIndicator)
ASSERT_TRUE(g_action_group_has_action(G_ACTION_GROUP(actions), "rotation-lock"));
std::vector<std::shared_ptr<Profile>> profiles = indicator.profiles();
- ASSERT_EQ(1, profiles.size());
+ ASSERT_EQ(2, profiles.size());
std::shared_ptr<Profile> phone = profiles[0];
ASSERT_EQ(std::string("phone"), phone->name());
ASSERT_FALSE(phone->header()->is_visible);
+ std::shared_ptr<Profile> desktop = profiles[1];
+ ASSERT_EQ(std::string("desktop"), desktop->name());
+ ASSERT_TRUE(desktop->header()->is_visible);
}