summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2012-04-13 13:36:41 +0300
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2012-04-13 13:36:41 +0300
commit0da6c17808341aacb3c303c49a88296febb031c3 (patch)
treea599c6dd7b09516c6172e928f7fb70febcc76196
parentc92ab27fd5d03dade4c3feda0d3d107c224ca278 (diff)
test-presence: Add tests for the high-level constructors of PresenceSpec
-rw-r--r--tests/presence.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/presence.cpp b/tests/presence.cpp
index c89bcb7d..487f7b0b 100644
--- a/tests/presence.cpp
+++ b/tests/presence.cpp
@@ -124,6 +124,31 @@ void TestPresence::testPresenceSpec()
TEST_PRESENCE_SPEC_FULL(QLatin1String("away"), ConnectionPresenceTypeAway, true, true);
TEST_PRESENCE_SPEC_FULL(QLatin1String("xa"), ConnectionPresenceTypeExtendedAway, false, false);
TEST_PRESENCE_SPEC_FULL(QLatin1String("offline"), ConnectionPresenceTypeOffline, true, false);
+
+ spec = PresenceSpec::available();
+ TEST_PRESENCE_SPEC(spec, true, QLatin1String("available"), ConnectionPresenceTypeAvailable, true, true);
+ spec = PresenceSpec::chat();
+ TEST_PRESENCE_SPEC(spec, true, QLatin1String("chat"), ConnectionPresenceTypeAvailable, true, true);
+ spec = PresenceSpec::pstn();
+ TEST_PRESENCE_SPEC(spec, true, QLatin1String("pstn"), ConnectionPresenceTypeAvailable, false, true);
+ spec = PresenceSpec::away();
+ TEST_PRESENCE_SPEC(spec, true, QLatin1String("away"), ConnectionPresenceTypeAway, true, true);
+ spec = PresenceSpec::brb();
+ TEST_PRESENCE_SPEC(spec, true, QLatin1String("brb"), ConnectionPresenceTypeAway, true, true);
+ spec = PresenceSpec::busy();
+ TEST_PRESENCE_SPEC(spec, true, QLatin1String("busy"), ConnectionPresenceTypeBusy, true, true);
+ spec = PresenceSpec::dnd();
+ TEST_PRESENCE_SPEC(spec, true, QLatin1String("dnd"), ConnectionPresenceTypeBusy, true, true);
+ spec = PresenceSpec::xa();
+ TEST_PRESENCE_SPEC(spec, true, QLatin1String("xa"), ConnectionPresenceTypeExtendedAway, true, true);
+ spec = PresenceSpec::hidden();
+ TEST_PRESENCE_SPEC(spec, true, QLatin1String("hidden"), ConnectionPresenceTypeHidden, true, true);
+ spec = PresenceSpec::offline();
+ TEST_PRESENCE_SPEC(spec, true, QLatin1String("offline"), ConnectionPresenceTypeOffline, false, true);
+ spec = PresenceSpec::unknown();
+ TEST_PRESENCE_SPEC(spec, true, QLatin1String("unknown"), ConnectionPresenceTypeUnknown, false, true);
+ spec = PresenceSpec::error();
+ TEST_PRESENCE_SPEC(spec, true, QLatin1String("error"), ConnectionPresenceTypeError, false, true);
}
QTEST_MAIN(TestPresence)