diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2011-06-30 16:19:24 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-06-30 16:19:24 -0700 |
commit | 7f7492669aaec6f3fb52e48f0f5a0ed32c99bea1 (patch) | |
tree | 2d17006fbdf0e888bb00ccba6c636a77033c7a1f /unit/test-sms.c | |
parent | 0c20ee6c533b62b4527525e924b04eb6a1e40fdf (diff) | |
download | ofono-7f7492669aaec6f3fb52e48f0f5a0ed32c99bea1.tar.bz2 |
build: Split non-root unit tests to have make check succeed
Diffstat (limited to 'unit/test-sms.c')
-rw-r--r-- | unit/test-sms.c | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/unit/test-sms.c b/unit/test-sms.c index abaed359..39e84428 100644 --- a/unit/test-sms.c +++ b/unit/test-sms.c @@ -1389,58 +1389,6 @@ static void test_cbs_assembly(void) cbs_assembly_free(assembly); } -static void test_serialize_assembly(void) -{ - unsigned char pdu[176]; - long pdu_len; - struct sms sms; - struct sms_assembly *assembly = sms_assembly_new("1234"); - guint16 ref; - guint8 max; - guint8 seq; - GSList *l; - - decode_hex_own_buf(assembly_pdu1, -1, &pdu_len, 0, pdu); - sms_decode(pdu, pdu_len, FALSE, assembly_pdu_len1, &sms); - - sms_extract_concatenation(&sms, &ref, &max, &seq); - l = sms_assembly_add_fragment(assembly, &sms, time(NULL), - &sms.deliver.oaddr, ref, max, seq); - - if (g_test_verbose()) { - g_print("Ref: %u\n", ref); - g_print("Max: %u\n", max); - g_print("From: %s\n", - sms_address_to_string(&sms.deliver.oaddr)); - } - - g_assert(g_slist_length(assembly->assembly_list) == 1); - g_assert(l == NULL); - - decode_hex_own_buf(assembly_pdu2, -1, &pdu_len, 0, pdu); - sms_decode(pdu, pdu_len, FALSE, assembly_pdu_len2, &sms); - - sms_extract_concatenation(&sms, &ref, &max, &seq); - l = sms_assembly_add_fragment(assembly, &sms, time(NULL), - &sms.deliver.oaddr, ref, max, seq); - g_assert(l == NULL); - - sms_assembly_free(assembly); - - assembly = sms_assembly_new("1234"); - - decode_hex_own_buf(assembly_pdu3, -1, &pdu_len, 0, pdu); - sms_decode(pdu, pdu_len, FALSE, assembly_pdu_len3, &sms); - - sms_extract_concatenation(&sms, &ref, &max, &seq); - l = sms_assembly_add_fragment(assembly, &sms, time(NULL), - &sms.deliver.oaddr, ref, max, seq); - - g_assert(l != NULL); - - sms_assembly_free(assembly); -} - static const char *ranges[] = { "1-5, 2, 3, 600, 569-900, 999", "0-20, 33, 44, 50-60, 20-50, 1-5, 5, 3, 5", NULL }; @@ -1731,9 +1679,6 @@ int main(int argc, char **argv) test_cbs_encode_decode); g_test_add_func("/testsms/Test CBS Assembly", test_cbs_assembly); - g_test_add_func("/testsms/Test SMS Assembly Serialize", - test_serialize_assembly); - g_test_add_func("/testsms/Range minimizer", test_range_minimizer); g_test_add_func("/testsms/Status Report Assembly", test_sr_assembly); |