unity_fixture_TestRunner.c 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* Copyright (c) 2010 James Grenning and Contributed to Unity Project
  2. * ==========================================
  3. * Unity Project - A Test Framework for C
  4. * Copyright (c) 2007 Mike Karlesky, Mark VanderVoord, Greg Williams
  5. * [Released under MIT License. Please refer to license.txt for details]
  6. * ========================================== */
  7. #include "unity_fixture.h"
  8. TEST_GROUP_RUNNER(UnityFixture)
  9. {
  10. RUN_TEST_CASE(UnityFixture, PointerSetting);
  11. RUN_TEST_CASE(UnityFixture, ForceMallocFail);
  12. RUN_TEST_CASE(UnityFixture, ReallocSmallerIsUnchanged);
  13. RUN_TEST_CASE(UnityFixture, ReallocSameIsUnchanged);
  14. RUN_TEST_CASE(UnityFixture, ReallocLargerNeeded);
  15. RUN_TEST_CASE(UnityFixture, ReallocNullPointerIsLikeMalloc);
  16. RUN_TEST_CASE(UnityFixture, ReallocSizeZeroFreesMemAndReturnsNullPointer);
  17. RUN_TEST_CASE(UnityFixture, CallocFillsWithZero);
  18. RUN_TEST_CASE(UnityFixture, PointerSet);
  19. RUN_TEST_CASE(UnityFixture, FreeNULLSafety);
  20. RUN_TEST_CASE(UnityFixture, ConcludeTestIncrementsFailCount);
  21. }
  22. TEST_GROUP_RUNNER(UnityCommandOptions)
  23. {
  24. RUN_TEST_CASE(UnityCommandOptions, DefaultOptions);
  25. RUN_TEST_CASE(UnityCommandOptions, OptionVerbose);
  26. RUN_TEST_CASE(UnityCommandOptions, OptionSelectTestByGroup);
  27. RUN_TEST_CASE(UnityCommandOptions, OptionSelectTestByName);
  28. RUN_TEST_CASE(UnityCommandOptions, OptionSelectRepeatTestsDefaultCount);
  29. RUN_TEST_CASE(UnityCommandOptions, OptionSelectRepeatTestsSpecificCount);
  30. RUN_TEST_CASE(UnityCommandOptions, MultipleOptions);
  31. RUN_TEST_CASE(UnityCommandOptions, MultipleOptionsDashRNotLastAndNoValueSpecified);
  32. RUN_TEST_CASE(UnityCommandOptions, UnknownCommandIsIgnored);
  33. RUN_TEST_CASE(UnityCommandOptions, GroupOrNameFilterWithoutStringFails);
  34. RUN_TEST_CASE(UnityCommandOptions, GroupFilterReallyFilters);
  35. RUN_TEST_CASE(UnityCommandOptions, TestShouldBeIgnored);
  36. }
  37. TEST_GROUP_RUNNER(LeakDetection)
  38. {
  39. RUN_TEST_CASE(LeakDetection, DetectsLeak);
  40. RUN_TEST_CASE(LeakDetection, BufferOverrunFoundDuringFree);
  41. RUN_TEST_CASE(LeakDetection, BufferOverrunFoundDuringRealloc);
  42. RUN_TEST_CASE(LeakDetection, BufferGuardWriteFoundDuringFree);
  43. RUN_TEST_CASE(LeakDetection, BufferGuardWriteFoundDuringRealloc);
  44. RUN_TEST_CASE(LeakDetection, PointerSettingMax);
  45. }
  46. TEST_GROUP_RUNNER(InternalMalloc)
  47. {
  48. RUN_TEST_CASE(InternalMalloc, MallocPastBufferFails);
  49. RUN_TEST_CASE(InternalMalloc, CallocPastBufferFails);
  50. RUN_TEST_CASE(InternalMalloc, MallocThenReallocGrowsMemoryInPlace);
  51. RUN_TEST_CASE(InternalMalloc, ReallocFailDoesNotFreeMem);
  52. }