| 3 | #include <ctime> |
| 4 | |
| 5 | int main(int argc, char *argv[]) { |
| 6 | ::testing::InitGoogleTest(&argc, argv); |
| 7 | |
| 8 | // seed the randomizer with the current system time |
| 9 | time_t t; |
| 10 | time(&t); |
| 11 | srand((unsigned int)t); |
| 12 | |
| 13 | // ............................................................................ |
| 14 | |
| 15 | // create a logger from both CPP |
| 16 | Assimp::DefaultLogger::create("AssimpLog_Cpp.log", Assimp::Logger::VERBOSE, |
| 17 | aiDefaultLogStream_STDOUT | aiDefaultLogStream_DEBUGGER | aiDefaultLogStream_FILE); |
| 18 | |
| 19 | // .. and C. They should smoothly work together |
| 20 | aiEnableVerboseLogging(AI_TRUE); |
| 21 | aiLogStream logstream = aiGetPredefinedLogStream(aiDefaultLogStream_FILE, "AssimpLog_C.log"); |
| 22 | aiAttachLogStream(&logstream); |
| 23 | |
| 24 | int result = RUN_ALL_TESTS(); |
| 25 | |
| 26 | // ............................................................................ |
| 27 | // but shutdown must be done from C to ensure proper deallocation |
| 28 | aiDetachAllLogStreams(); |
| 29 | |
| 30 | return result; |
| 31 | } |
nothing calls this directly
no test coverage detected