mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
Work on data management. Add some tests
This commit is contained in:
@@ -56,7 +56,7 @@
|
||||
// test files
|
||||
#include <test_common.inl>
|
||||
#include <test_spicemanager.inl>
|
||||
#include <test_sceneloader.inl>
|
||||
#include <test_assetloader.inl>
|
||||
#include <test_timeline.inl>
|
||||
|
||||
#ifdef OPENSPACE_MODULE_GLOBEBROWSING_ENABLED
|
||||
@@ -108,7 +108,20 @@ namespace {
|
||||
int main(int argc, char** argv) {
|
||||
std::vector<std::string> args;
|
||||
bool close;
|
||||
openspace::OpenSpaceEngine::create(argc, argv, std::make_unique<openspace::WindowWrapper>(), args, close);
|
||||
bool consoleLog = false;
|
||||
|
||||
|
||||
// Workaround for Visual Studio Google Test Adapter:
|
||||
// Do not try to initialize osengine if gtest is just listing tests
|
||||
bool skipOsEng = false;
|
||||
std::vector<std::string> gtestArgs(argv, argv + argc);
|
||||
if (std::find(gtestArgs.begin(), gtestArgs.end(), "--gtest_list_tests") != gtestArgs.end()) {
|
||||
skipOsEng = true;
|
||||
}
|
||||
|
||||
if (!skipOsEng) {
|
||||
openspace::OpenSpaceEngine::create(argc, argv, std::make_unique<openspace::WindowWrapper>(), args, close, consoleLog);
|
||||
}
|
||||
|
||||
testing::InitGoogleTest(&argc, argv);
|
||||
|
||||
@@ -116,8 +129,18 @@ int main(int argc, char** argv) {
|
||||
testing::internal::CaptureStdout();
|
||||
testing::internal::CaptureStderr();
|
||||
#endif
|
||||
|
||||
openspace::SpiceManager::deinitialize();
|
||||
|
||||
#ifdef PRINT_OUTPUT
|
||||
|
||||
// Stop capturing std out
|
||||
std::string output = testing::internal::GetCapturedStdout();
|
||||
std::string error = testing::internal::GetCapturedStderr();
|
||||
|
||||
//std::cout << output;
|
||||
//std::cerr << error;
|
||||
#endif
|
||||
|
||||
//openspace::SpiceManager::deinitialize();
|
||||
|
||||
bool b = RUN_ALL_TESTS();
|
||||
|
||||
@@ -130,8 +153,7 @@ int main(int argc, char** argv) {
|
||||
|
||||
std::ofstream e("error.txt");
|
||||
e << error;
|
||||
#endif
|
||||
|
||||
#endif
|
||||
return b;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user