2009-01-12 22:06:54 +00:00
|
|
|
#include "UnitTestPCH.h"
|
2008-07-22 22:52:16 +00:00
|
|
|
|
2008-07-29 20:36:27 +00:00
|
|
|
#include <math.h>
|
|
|
|
#include <time.h>
|
2008-07-22 22:52:16 +00:00
|
|
|
|
2014-09-07 23:52:03 +00:00
|
|
|
int main(int argc, char* argv[])
|
2008-07-22 22:52:16 +00:00
|
|
|
{
|
2014-09-07 23:52:03 +00:00
|
|
|
::testing::InitGoogleTest(&argc, argv);
|
|
|
|
|
2008-07-29 20:36:27 +00:00
|
|
|
// seed the randomizer with the current system time
|
|
|
|
time_t t;time(&t);
|
|
|
|
srand((unsigned int)t);
|
|
|
|
|
2009-05-28 11:32:54 +00:00
|
|
|
// ............................................................................
|
|
|
|
|
2014-09-07 23:52:03 +00:00
|
|
|
// create a logger from both CPP
|
2009-05-28 11:32:54 +00:00
|
|
|
Assimp::DefaultLogger::create("AssimpLog_Cpp.txt",Assimp::Logger::VERBOSE,
|
|
|
|
aiDefaultLogStream_DEBUGGER | aiDefaultLogStream_FILE);
|
|
|
|
|
|
|
|
// .. and C. They should smoothly work together
|
|
|
|
aiEnableVerboseLogging(AI_TRUE);
|
2014-08-17 22:34:45 +00:00
|
|
|
aiLogStream logstream= aiGetPredefinedLogStream(aiDefaultLogStream_FILE, "AssimpLog_C.txt");
|
|
|
|
aiAttachLogStream(&logstream);
|
2009-05-28 11:32:54 +00:00
|
|
|
|
2014-09-07 23:52:03 +00:00
|
|
|
int result = RUN_ALL_TESTS();
|
2009-01-12 22:06:54 +00:00
|
|
|
|
2009-05-28 11:32:54 +00:00
|
|
|
// ............................................................................
|
|
|
|
// but shutdown must be done from C to ensure proper deallocation
|
|
|
|
aiDetachAllLogStreams();
|
2009-01-12 22:06:54 +00:00
|
|
|
|
2014-09-07 23:52:03 +00:00
|
|
|
return result;
|
2014-08-17 22:34:45 +00:00
|
|
|
}
|