MCPcopy Create free account
hub / github.com/assimp/assimp / main

Function main

test/unit/Main.cpp:5–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include <ctime>
4
5int 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}

Callers

nothing calls this directly

Calls 5

InitGoogleTestFunction · 0.85
aiEnableVerboseLoggingFunction · 0.85
aiAttachLogStreamFunction · 0.85
RUN_ALL_TESTSFunction · 0.85
aiDetachAllLogStreamsFunction · 0.85

Tested by

no test coverage detected