Main.c 661 B

12345678910111213141516171819202122232425262728
  1. #include <core/Logger.h>
  2. #include <core/Utility.h>
  3. #include <locale.h>
  4. #include <stdio.h>
  5. #include <string.h>
  6. #include "Tests.h"
  7. int main(int argAmount, char** args) {
  8. if(argAmount >= 2 && strcmp(args[1], "help") == 0) {
  9. puts("test");
  10. puts("window");
  11. return 0;
  12. }
  13. setlocale(LC_ALL, "en_US.utf8");
  14. if(argAmount < 2) {
  15. LOG_ERROR("missing mode");
  16. return 0;
  17. } else if(strcmp("test", args[1]) == 0) {
  18. testImageReader("test/resources");
  19. testNetwork();
  20. } else if(strcmp("window", args[1]) == 0) {
  21. testWindow();
  22. }
  23. finalizeTests();
  24. printMemoryReport();
  25. return 0;
  26. }