Main.cpp 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. #include "../../include/assimp/DefaultLogger.hpp"
  2. #include "UnitTestPCH.h"
  3. #include <math.h>
  4. #include <time.h>
  5. int main(int argc, char *argv[]) {
  6. ::testing::InitGoogleTest(&argc, argv);
  7. // seed the randomizer with the current system time
  8. time_t t;
  9. time(&t);
  10. srand((unsigned int)t);
  11. // ............................................................................
  12. // create a logger from both CPP
  13. Assimp::DefaultLogger::create("AssimpLog_Cpp.txt", Assimp::Logger::VERBOSE,
  14. aiDefaultLogStream_STDOUT | aiDefaultLogStream_DEBUGGER | aiDefaultLogStream_FILE);
  15. // .. and C. They should smoothly work together
  16. aiEnableVerboseLogging(AI_TRUE);
  17. aiLogStream logstream = aiGetPredefinedLogStream(aiDefaultLogStream_FILE, "AssimpLog_C.txt");
  18. aiAttachLogStream(&logstream);
  19. int result = RUN_ALL_TESTS();
  20. // ............................................................................
  21. // but shutdown must be done from C to ensure proper deallocation
  22. aiDetachAllLogStreams();
  23. return result;
  24. }