mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
Solve merge conflicts.
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#include <ghoul/misc/dictionary.h>
|
||||
#include <ghoul/lua/ghoul_lua.h>
|
||||
|
||||
// test files
|
||||
//#include <test_common.inl>
|
||||
//#include <test_spicemanager.inl>
|
||||
//#include <test_scenegraphloader.inl>
|
||||
@@ -39,6 +40,7 @@
|
||||
|
||||
//#include <test_luaconversions.inl>
|
||||
//#include <test_powerscalecoordinates.inl>
|
||||
|
||||
//#include <test_angle.inl>
|
||||
//#include <test_latlonpatch.inl>
|
||||
//#include <test_gdalwms.inl>
|
||||
@@ -46,6 +48,8 @@
|
||||
|
||||
//#include <test_concurrentqueue.inl>
|
||||
//#include <test_concurrentjobmanager.inl>
|
||||
//#include <test_screenspaceimage.inl>
|
||||
//#include <test_iswamanager.inl>
|
||||
|
||||
#include <openspace/engine/openspaceengine.h>
|
||||
#include <openspace/engine/wrapper/windowwrapper.h>
|
||||
|
||||
84
tests/test_iswamanager.inl
Normal file
84
tests/test_iswamanager.inl
Normal file
@@ -0,0 +1,84 @@
|
||||
/*****************************************************************************************
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2016 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
* without restriction, including without limitation the rights to use, copy, modify, *
|
||||
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
|
||||
* permit persons to whom the Software is furnished to do so, subject to the following *
|
||||
* conditions: *
|
||||
* *
|
||||
* The above copyright notice and this permission notice shall be included in all copies *
|
||||
* or substantial portions of the Software. *
|
||||
* *
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
|
||||
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
|
||||
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
|
||||
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
||||
****************************************************************************************/
|
||||
#ifdef OPENSPACE_MODULE_ISWA_ENABLED
|
||||
#include "gtest/gtest.h"
|
||||
#define private public
|
||||
#include <modules/iswa/util/iswamanager.h>
|
||||
#define private private
|
||||
#include <openspace/util/time.h>
|
||||
|
||||
/*
|
||||
* For each test the following is run:
|
||||
* Constructor() -> setUp() -> test -> tearDown() -> Deconstructor()
|
||||
*/
|
||||
|
||||
namespace openspace {
|
||||
|
||||
class IswaManagerTest : public testing::Test{
|
||||
protected:
|
||||
|
||||
IswaManagerTest()
|
||||
{
|
||||
IswaManager::initialize();
|
||||
}
|
||||
|
||||
~IswaManagerTest(){
|
||||
IswaManager::deinitialize();
|
||||
}
|
||||
|
||||
|
||||
void reset() {}
|
||||
|
||||
//std::shared_ptr<ISWAManager> iSWAManager;
|
||||
};
|
||||
|
||||
TEST_F(IswaManagerTest, initialize){
|
||||
|
||||
IswaManager::deinitialize();
|
||||
|
||||
ASSERT_TRUE(!IswaManager::isInitialized()) << "IswaManager is initialized before initialize call";
|
||||
|
||||
IswaManager::initialize();
|
||||
|
||||
ASSERT_TRUE(IswaManager::isInitialized()) << "IswaManager is not initialized after initialize call";
|
||||
|
||||
ASSERT_NE(&IswaManager::ref(), nullptr) << "IswaManager ref() is not a nullptr";
|
||||
|
||||
EXPECT_EQ(&IswaManager::ref(), &IswaManager::ref()) << "IswaManager ref() returns the same object twice";
|
||||
}
|
||||
|
||||
TEST_F(IswaManagerTest, iswaUrl){
|
||||
|
||||
//OsEng.loadSpiceKernels();
|
||||
//Time::ref().setTime(double(100000.0));
|
||||
//Time::ref().preSynchronization();
|
||||
//Time::ref().postSynchronizationPreDraw();
|
||||
//std::string url = ISWAManager::ref().iSWAurl(7);
|
||||
//std::string expectedUrl = "http://iswa2.ccmc.gsfc.nasa.gov/IswaSystemWebApp/iSWACygnetStreamer?timestamp=2000-01-02%2015:45:35&window=-1&cygnetId=7";
|
||||
|
||||
//EXPECT_EQ(expectedUrl, url);
|
||||
}
|
||||
|
||||
}//namespace openspace
|
||||
#endif
|
||||
71
tests/test_screenspaceimage.inl
Normal file
71
tests/test_screenspaceimage.inl
Normal file
@@ -0,0 +1,71 @@
|
||||
/*****************************************************************************************
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2016 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
* without restriction, including without limitation the rights to use, copy, modify, *
|
||||
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
|
||||
* permit persons to whom the Software is furnished to do so, subject to the following *
|
||||
* conditions: *
|
||||
* *
|
||||
* The above copyright notice and this permission notice shall be included in all copies *
|
||||
* or substantial portions of the Software. *
|
||||
* *
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
|
||||
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
|
||||
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
|
||||
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
||||
****************************************************************************************/
|
||||
|
||||
|
||||
// #include "gtest/gtest.h"
|
||||
// //Make private variables public for testing
|
||||
// #define private public
|
||||
// #include <modules/base/rendering/screenspaceimage.h>
|
||||
// #define private private
|
||||
// /*
|
||||
// * For each test the following is run:
|
||||
// * Constructor() -> setUp() -> test -> tearDown() -> Deconstructor()
|
||||
// */
|
||||
|
||||
// namespace openspace {
|
||||
|
||||
// class ScreenSpaceRenderableTest : public testing::Test{
|
||||
// protected:
|
||||
|
||||
// ScreenSpaceRenderableTest()
|
||||
// // _ssr(texturePath)
|
||||
// {
|
||||
// // _sharedSsr = std::make_shared<ScreenSpaceImage>("${OPENSPACE_DATA}/test3.jpg");
|
||||
// }
|
||||
|
||||
// ~ScreenSpaceRenderableTest(){}
|
||||
|
||||
|
||||
// void reset() {}
|
||||
|
||||
// // These variables are shared by all tests
|
||||
// std::string texturePath = "${OPENSPACE_DATA}/test2.jpg";
|
||||
// ScreenSpaceImage _ssr;
|
||||
// std::shared_ptr<ScreenSpaceRenderable> _sharedSsr;
|
||||
// };
|
||||
|
||||
|
||||
// TEST_F(ScreenSpaceRenderableTest, initialize){
|
||||
// bool isReady = _ssr.isReady();
|
||||
// ASSERT_TRUE(!isReady) << "ScreenSpaceImage is ready before initialize";
|
||||
|
||||
// // cannot test initialize, crashes at createplane becasue of opengl functions. needs mocking
|
||||
// //_ssr.initialize();
|
||||
// //isReady = _ssr.isReady();
|
||||
// //ASSERT_TRUE(!isReady) << "ScreenSpaceImage is not ready after initialize";
|
||||
// //_ssr.deinitialize();
|
||||
// //isReady = _ssr.isReady();
|
||||
// //ASSERT_TRUE(!isReady) << "ScreenSpaceImage is still ready after deinitialize";
|
||||
// }
|
||||
// }//namespace openspace
|
||||
Reference in New Issue
Block a user