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.

65 lines
1.8 KiB

  1. /* /////////////////////////////////////////////////////////////////////////
  2. * File: test/unit/test.unit.fe.fail/test.unit.fe.fail.c
  3. *
  4. * Purpose: Implementation file for the test.unit.fe.fail project.
  5. *
  6. * Created: 14th May 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/frontends/fe.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.fe.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.fe.fail", verbosity))
  32. {
  33. /* Test-1 */
  34. if(XTESTS_CASE_BEGIN("Test-1", "Verify that the initialisation fails"))
  35. {
  36. void* token;
  37. int res;
  38. res = pantheios_fe_init(NULL, &token);
  39. XTESTS_TEST_INTEGER_LESS(0, res);
  40. XTESTS_TEST_INTEGER_EQUAL(PANTHEIOS_FE_INIT_RC_INTENDED_FAILURE, res);
  41. XTESTS_CASE_END("Test-1");
  42. }
  43. XTESTS_PRINT_RESULTS();
  44. XTESTS_END_RUNNER_UPDATE_EXITCODE(&retCode);
  45. }
  46. return retCode;
  47. }
  48. /* ///////////////////////////// end of file //////////////////////////// */