diff options
author | sanine <sanine.not@pm.me> | 2022-03-04 10:47:15 -0600 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-03-04 10:47:15 -0600 |
commit | 058f98a63658dc1a2579826ba167fd61bed1e21f (patch) | |
tree | bcba07a1615a14d943f3af3f815a42f3be86b2f3 /src/mesh/assimp-master/test/unit/Main.cpp | |
parent | 2f8028ac9e0812cb6f3cbb08f0f419e4e717bd22 (diff) |
add assimp submodule
Diffstat (limited to 'src/mesh/assimp-master/test/unit/Main.cpp')
-rw-r--r-- | src/mesh/assimp-master/test/unit/Main.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/mesh/assimp-master/test/unit/Main.cpp b/src/mesh/assimp-master/test/unit/Main.cpp new file mode 100644 index 0000000..d5049fa --- /dev/null +++ b/src/mesh/assimp-master/test/unit/Main.cpp @@ -0,0 +1,33 @@ +#include "../../include/assimp/DefaultLogger.hpp" +#include "UnitTestPCH.h" + +#include <math.h> +#include <time.h> + +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.txt", 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.txt"); + aiAttachLogStream(&logstream); + + int result = RUN_ALL_TESTS(); + + // ............................................................................ + // but shutdown must be done from C to ensure proper deallocation + aiDetachAllLogStreams(); + + return result; +} |