TestLogger.h 770 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef TESTLOGGER_H
  2. #define TESTLOGGER_H
  3. #include <iostream>
  4. #include <fstream>
  5. #include <vector>
  6. #include "code/ISnuviLogger.h"
  7. class TestLogger : public ISnuviLogger
  8. {
  9. public:
  10. TestLogger();
  11. ~TestLogger();
  12. void print(
  13. const std::string* message = nullptr,
  14. const std::exception* ex = nullptr,
  15. const std::string* function = nullptr,
  16. const std::string* scriptname = nullptr,
  17. const Script* sc = nullptr,
  18. int line = -1) override;
  19. void reset();
  20. bool check(const std::string& name, std::ifstream& check);
  21. private:
  22. void printNoMatch(const std::string& name, std::vector<std::string>& file, unsigned int line);
  23. std::vector<std::string> output;
  24. };
  25. #endif