TestLogger.h 686 B

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