Skip to content

Commit

Permalink
[test_delivery_ind] Housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
monich committed Mar 15, 2014
1 parent ec8f2ae commit f0389b1
Showing 1 changed file with 6 additions and 18 deletions.
24 changes: 6 additions & 18 deletions mms-lib/test/delivery_ind/test_delivery_ind.c
Expand Up @@ -24,19 +24,13 @@
#define RET_ERR (1)
#define RET_TIMEOUT (2)

#define MMS_MESSAGE_TYPE_NONE (0)

#define DATA_DIR "data/"

typedef struct test_desc {
const char* name;
const char* ind_file;
const char* mmsid;
MMS_DELIVERY_STATUS status;
int flags;

#define TEST_FAILURE_OK (0x01)

} TestDesc;

typedef struct test {
Expand All @@ -58,20 +52,17 @@ static const TestDesc delivery_tests[] = {
"DeliveryOK",
"m-delivery.ind",
"BH24CBJJA40W1",
MMS_DELIVERY_STATUS_RETRIEVED,
0
MMS_DELIVERY_STATUS_RETRIEVED
},{
"DeliveryUnexpected",
"m-delivery.ind",
"UNKNOWN",
MMS_DELIVERY_STATUS_INVALID,
0
MMS_DELIVERY_STATUS_INVALID
},{
"DeliveryRejected",
"m-delivery.ind",
"BH24CBJJA40W1",
MMS_DELIVERY_STATUS_REJECTED,
0
MMS_DELIVERY_STATUS_REJECTED
}
};

Expand Down Expand Up @@ -195,13 +186,10 @@ test_run1(
MMS_INFO("%s FAILED", desc->name);
}
} else {
MMS_ERR("%s", MMS_ERRMSG(error));
MMS_INFO("%s FAILED", desc->name);
g_error_free(error);
if (desc->flags & TEST_FAILURE_OK) {
test.ret = RET_OK;
test_finish(&test);
} else {
MMS_INFO("%s FAILED", desc->name);
}
test_finish(&test);
}
g_bytes_unref(push);
test_finalize(&test);
Expand Down

0 comments on commit f0389b1

Please sign in to comment.