Ejemplo n.º 1
0
int main(void)
{
  INIT_TEST("SMS_TEST");
  test_sms_Init();

  test_sms_Register_for_one();
  test_sms_Unregister();

  test_sms_Register_for_all();
  test_sms_Unregister();

  test_sms_Register_failure();
  test_sms_Unregister_failure();

  test_sms_Send();
  test_sms_Destroy();
  return 0;
}
Ejemplo n.º 2
0
int main(void)
{
  swi_sms_regId_t regId;

  INIT_TEST("SMS_TEST");
  CHECK_TEST(test_sms_Init());

  CHECK_TEST(test_sms_Register((swi_sms_ReceptionCB_t)sms_handler, PHONE_NUMBER, MESSAGE, &regId));
  CHECK_TEST(test_sms_Unregister(regId));

  CHECK_TEST(test_sms_Register((swi_sms_ReceptionCB_t)sms_handler, NULL, NULL, &regId));
  CHECK_TEST(test_sms_Unregister(regId));

  CHECK_TEST(test_sms_Register_failure());
  CHECK_TEST(test_sms_Unregister_failure());

  CHECK_TEST(test_sms_Send(PHONE_NUMBER, MESSAGE, SWI_SMS_8BITS));
  CHECK_TEST(test_sms_Destroy());
  return 0;
}