new stuff

This commit is contained in:
Tarion 2026-07-03 03:41:25 +02:00
parent 8998bc3936
commit 64c8492e5c
No known key found for this signature in database
6907 changed files with 3401899 additions and 0 deletions

31
assimp/test/unit/Main.cpp Normal file
View file

@ -0,0 +1,31 @@
#include "../../include/assimp/DefaultLogger.hpp"
#include "UnitTestPCH.h"
#include <ctime>
int main(int argc, char *argv[]) {
::testing::InitGoogleTest(&argc, argv);
// seed the randomizer with the current system time
time_t t;
time(&t);
srand((unsigned int)t);
// ............................................................................
// create a logger from both CPP
Assimp::DefaultLogger::create("AssimpLog_Cpp.log", Assimp::Logger::VERBOSE,
aiDefaultLogStream_STDOUT | aiDefaultLogStream_DEBUGGER | aiDefaultLogStream_FILE);
// .. and C. They should smoothly work together
aiEnableVerboseLogging(AI_TRUE);
aiLogStream logstream = aiGetPredefinedLogStream(aiDefaultLogStream_FILE, "AssimpLog_C.log");
aiAttachLogStream(&logstream);
int result = RUN_ALL_TESTS();
// ............................................................................
// but shutdown must be done from C to ensure proper deallocation
aiDetachAllLogStreams();
return result;
}