aboutsummaryrefslogtreecommitdiff
path: root/src/tests
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2013-08-19 12:37:43 +0200
committerAleksander Morgado <aleksander@lanedo.com>2013-10-25 19:47:19 +0200
commit49ab6ce9807a0a9925e998671df499081a0d47cc (patch)
tree95ab6197f8a92c7a07931855571ea904f05f103c /src/tests
parentaba7efb6155a15298689211053b47e725b25e66d (diff)
sms-part-cdma: read 7-bit ASCII text or raw data
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test-sms-part-cdma.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/tests/test-sms-part-cdma.c b/src/tests/test-sms-part-cdma.c
index 86aaaed5..cad20323 100644
--- a/src/tests/test-sms-part-cdma.c
+++ b/src/tests/test-sms-part-cdma.c
@@ -49,7 +49,8 @@ common_test_part_from_hexpdu (const gchar *hexpdu,
MMSmsCdmaTeleserviceId expected_teleservice_id,
MMSmsCdmaServiceCategory expected_service_category,
const gchar *expected_address,
- guint8 expected_bearer_reply_option)
+ guint8 expected_bearer_reply_option,
+ const gchar *expected_text)
{
MMSmsPart *part;
GError *error = NULL;
@@ -71,6 +72,8 @@ common_test_part_from_hexpdu (const gchar *hexpdu,
}
if (expected_bearer_reply_option)
g_assert_cmpuint (expected_bearer_reply_option, ==, mm_sms_part_get_message_reference (part));
+ if (expected_text)
+ g_assert_cmpstr (expected_text, ==, mm_sms_part_get_text (part));
mm_sms_part_free (part);
}
@@ -81,7 +84,8 @@ common_test_part_from_pdu (const guint8 *pdu,
MMSmsCdmaTeleserviceId expected_teleservice_id,
MMSmsCdmaServiceCategory expected_service_category,
const gchar *expected_address,
- guint8 expected_bearer_reply_option)
+ guint8 expected_bearer_reply_option,
+ const gchar *expected_text)
{
gchar *hexpdu;
@@ -90,7 +94,8 @@ common_test_part_from_pdu (const guint8 *pdu,
expected_teleservice_id,
expected_service_category,
expected_address,
- expected_bearer_reply_option);
+ expected_bearer_reply_option,
+ expected_text);
g_free (hexpdu);
}
@@ -146,7 +151,8 @@ test_pdu1 (void)
MM_SMS_CDMA_TELESERVICE_ID_WMT,
MM_SMS_CDMA_SERVICE_CATEGORY_UNKNOWN,
"3305773196",
- 63);
+ 63,
+ "AAAA");
}
static void
@@ -201,7 +207,8 @@ test_invalid_address_length (void)
MM_SMS_CDMA_TELESERVICE_ID_WMT,
MM_SMS_CDMA_SERVICE_CATEGORY_UNKNOWN,
"",
- 63);
+ 63,
+ NULL);
}
/************************************************************/