ErrorSimulator.hpp 488 B

1234567891011121314151617181920
  1. #ifndef CORE_ERROR_SIMULATOR_HPP
  2. #define CORE_ERROR_SIMULATOR_HPP
  3. #ifdef ERROR_SIMULATOR
  4. namespace Core::Fail {
  5. extern bool realloc;
  6. extern bool fileClose;
  7. extern bool timeGet;
  8. extern int leftAllocations;
  9. }
  10. #define CORE_REALLOC_FAIL Core::Fail::realloc
  11. #define CORE_FILE_CLOSE_FAIL Core::Fail::fileClose
  12. #define CORE_TIME_GET_FAIL Core::Fail::timeGet
  13. #else
  14. #define CORE_REALLOC_FAIL false
  15. #define CORE_FILE_CLOSE_FAIL false
  16. #define CORE_TIME_GET_FAIL false
  17. #endif
  18. #endif