ErrorSimulator.hpp 454 B

12345678910111213141516171819
  1. #ifndef CORE_ERROR_SIMULATOR_HPP
  2. #define CORE_ERROR_SIMULATOR_HPP
  3. #ifdef ERROR_SIMULATOR
  4. namespace Core::Fail {
  5. extern bool alloc;
  6. extern bool fileClose;
  7. extern bool timeGet;
  8. }
  9. #define CORE_ALLOC_FAIL Core::Fail::alloc
  10. #define CORE_FILE_CLOSE_FAIL Core::Fail::fileClose
  11. #define CORE_TIME_GET_FAIL Core::Fail::timeGet
  12. #else
  13. #define CORE_ALLOC_FAIL(...) false
  14. #define CORE_FILE_CLOSE_FAIL false
  15. #define CORE_TIME_GET_FAIL false
  16. #endif
  17. #endif