You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.8 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: test/unit/test.unit.bec.fail/test.unit.bec.fail.c
  3. *
  4. * Purpose: Implementation file for the test.unit.bec.fail project.
  5. *
  6. * Created: 27th January 2008
  7. * Updated: 22nd March 2010
  8. *
  9. * Status: Wizard-generated
  10. *
  11. * License: (Licensed under the Synesis Software Open License)
  12. *
  13. * Copyright (c) 2008-2010, Synesis Software Pty Ltd.
  14. * All rights reserved.
  15. *
  16. * www: http://www.synesis.com.au/software
  17. *
  18. * ////////////////////////////////////////////////////////////////////// */
  19. #include <pantheios/backends/bec.fail.h>
  20. #include <pantheios/init_codes.h>
  21. #include <xtests/xtests.h>
  22. #include <stlsoft/stlsoft.h> /* for STLSOFT_NUM_ELEMENTS */
  23. #include <stdio.h> /* for fprintf() */
  24. #include <stdlib.h> /* for EXIT_SUCCESS, EXIT_FAILURE */
  25. const PAN_CHAR_T PANTHEIOS_FE_PROCESS_IDENTITY[] = PANTHEIOS_LITERAL_STRING("test.unit.bec.fail");
  26. int main(int argc, char** argv)
  27. {
  28. int retCode = EXIT_SUCCESS;
  29. int verbosity = 2;
  30. XTESTS_COMMANDLINE_PARSEVERBOSITY(argc, argv, &verbosity);
  31. if(XTESTS_START_RUNNER("test.unit.bec.fail", verbosity))
  32. {
  33. /* Test-1 */
  34. if(XTESTS_CASE_BEGIN("Test-1", "Verify that it fails"))
  35. {
  36. void* token;
  37. int res = pantheios_be_fail_init(PANTHEIOS_FE_PROCESS_IDENTITY, 0, NULL, NULL, &token);
  38. XTESTS_TEST_INTEGER_LESS(0, res);
  39. XTESTS_TEST_INTEGER_EQUAL(PANTHEIOS_BE_INIT_RC_INTENDED_FAILURE, res);
  40. XTESTS_CASE_END("Test-1");
  41. }
  42. XTESTS_PRINT_RESULTS();
  43. XTESTS_END_RUNNER_UPDATE_EXITCODE(&retCode);
  44. }
  45. return retCode;
  46. }
  47. /* ///////////////////////////// end of file //////////////////////////// */