Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
OpenSpace
Commits
9fcdd9f9
Commit
9fcdd9f9
authored
8 years ago
by
Emil Axelsson
Browse files
Options
Download
Plain Diff
Merge branch 'master' of github.com:OpenSpace/OpenSpace into feature/domecasting
parents
848a6503
51b420f2
Changes
19
Hide whitespace changes
Inline
Side-by-side
Showing
19 changed files
ext/ghoul
+1
-1
ext/ghoul
modules/debugging/rendering/debugrenderer.cpp
+1
-1
modules/debugging/rendering/debugrenderer.cpp
modules/newhorizons/rendering/renderablemodelprojection.cpp
+1
-1
modules/newhorizons/rendering/renderablemodelprojection.cpp
modules/newhorizons/rendering/renderableshadowcylinder.cpp
+1
-3
modules/newhorizons/rendering/renderableshadowcylinder.cpp
modules/newhorizons/util/imagesequencer.cpp
+4
-2
modules/newhorizons/util/imagesequencer.cpp
modules/newhorizons/util/instrumentdecoder.cpp
+7
-2
modules/newhorizons/util/instrumentdecoder.cpp
modules/newhorizons/util/instrumentdecoder.h
+1
-0
modules/newhorizons/util/instrumentdecoder.h
modules/newhorizons/util/projectioncomponent.cpp
+2
-2
modules/newhorizons/util/projectioncomponent.cpp
modules/onscreengui/src/gui.cpp
+1
-1
modules/onscreengui/src/gui.cpp
modules/onscreengui/src/guiiswacomponent.cpp
+0
-1
modules/onscreengui/src/guiiswacomponent.cpp
modules/onscreengui/src/guiperformancecomponent.cpp
+6
-9
modules/onscreengui/src/guiperformancecomponent.cpp
modules/onscreengui/src/guipropertycomponent.cpp
+8
-8
modules/onscreengui/src/guipropertycomponent.cpp
modules/onscreengui/src/renderproperties.cpp
+27
-17
modules/onscreengui/src/renderproperties.cpp
src/mission/missionmanager.cpp
+1
-1
src/mission/missionmanager.cpp
src/util/spicemanager_lua.inl
+2
-2
src/util/spicemanager_lua.inl
src/util/time.cpp
+3
-2
src/util/time.cpp
tests/main.cpp
+2
-0
tests/main.cpp
tests/test_concurrentjobmanager.inl
+0
-3
tests/test_concurrentjobmanager.inl
tests/test_spicemanager.inl
+66
-10
tests/test_spicemanager.inl
with
134 additions
and
66 deletions
+134
-66
ghoul
@
20040126
Compare
c37ff8be
...
20040126
Subproject commit
c37ff8beb5b8825ecb67b121ae4deac34677e1b
d
Subproject commit
200401261cba513fb1faa4b7e92bd213435625a
d
This diff is collapsed.
Click to expand it.
modules/debugging/rendering/debugrenderer.cpp
+
1
-
1
View file @
9fcdd9f9
...
...
@@ -111,7 +111,7 @@ void DebugRenderer::renderVertices(const Vertices& clippingSpacePoints, GLenum m
glVertexAttribPointer
(
0
,
4
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
clippingSpacePoints
[
0
]),
0
);
// Draw the vertices
glDrawArrays
(
mode
,
0
,
clippingSpacePoints
.
size
());
glDrawArrays
(
mode
,
0
,
static_cast
<
GLsizei
>
(
clippingSpacePoints
.
size
())
)
;
// Check for errors
GLenum
error
=
glGetError
();
...
...
This diff is collapsed.
Click to expand it.
modules/newhorizons/rendering/renderablemodelprojection.cpp
+
1
-
1
View file @
9fcdd9f9
...
...
@@ -347,7 +347,7 @@ void RenderableModelProjection::attitudeParameters(double time) {
try
{
_instrumentMatrix
=
SpiceManager
::
ref
().
positionTransformMatrix
(
_projectionComponent
.
instrumentId
(),
_destination
,
time
);
}
catch
(
const
SpiceManager
::
SpiceException
&
e
)
{
catch
(
const
SpiceManager
::
SpiceException
&
)
{
return
;
}
...
...
This diff is collapsed.
Click to expand it.
modules/newhorizons/rendering/renderableshadowcylinder.cpp
+
1
-
3
View file @
9fcdd9f9
...
...
@@ -34,8 +34,6 @@
namespace
{
const
std
::
string
_loggerCat
=
"RenderablePlane"
;
const
char
*
KeyType
=
"TerminatorType"
;
const
char
*
KeyLightSource
=
"LightSource"
;
const
char
*
KeyObserver
=
"Observer"
;
...
...
@@ -50,7 +48,7 @@ namespace openspace {
RenderableShadowCylinder
::
RenderableShadowCylinder
(
const
ghoul
::
Dictionary
&
dictionary
)
:
Renderable
(
dictionary
)
,
_numberOfPoints
(
"amountOfPoints"
,
"Points"
,
190
,
1
,
300
)
,
_shadowLength
(
"shadowLength"
,
"Shadow Length"
,
0.1
,
0.0
,
0.5
)
,
_shadowLength
(
"shadowLength"
,
"Shadow Length"
,
0.1
f
,
0.0
f
,
0.5
f
)
,
_shadowColor
(
"shadowColor"
,
"Shadow Color"
,
glm
::
vec4
(
1.
f
,
1.
f
,
1.
f
,
0.25
f
),
glm
::
vec4
(
0.
f
),
glm
::
vec4
(
1.
f
))
,
_shader
(
nullptr
)
...
...
This diff is collapsed.
Click to expand it.
modules/newhorizons/util/imagesequencer.cpp
+
4
-
2
View file @
9fcdd9f9
...
...
@@ -333,7 +333,9 @@ bool ImageSequencer::getImagePaths(std::vector<Image>& captures,
}
if
(
beforeDist
<
1.0
||
nextDist
<
1.0
)
{
toDelete
.
push_back
(
std
::
distance
(
captures
.
begin
(),
it
));
toDelete
.
push_back
(
static_cast
<
int
>
(
std
::
distance
(
captures
.
begin
(),
it
))
);
}
}
}
...
...
@@ -341,7 +343,7 @@ bool ImageSequencer::getImagePaths(std::vector<Image>& captures,
for
(
size_t
i
=
0
;
i
<
toDelete
.
size
();
++
i
)
{
// We have to subtract i here as we already have deleted i value
// before this and we need to adjust the location
int
v
=
toDelete
[
i
]
-
i
;
int
v
=
toDelete
[
i
]
-
static_cast
<
int
>
(
i
)
;
captures
.
erase
(
captures
.
begin
()
+
v
);
}
...
...
This diff is collapsed.
Click to expand it.
modules/newhorizons/util/instrumentdecoder.cpp
+
7
-
2
View file @
9fcdd9f9
...
...
@@ -27,6 +27,7 @@
#include
<ghoul/misc/assert.h>
#include
<ghoul/logging/logmanager.h>
#include
<ghoul/misc/dictionary.h>
namespace
{
const
std
::
string
_loggerCat
=
"InstrumentDecoder"
;
const
char
*
keyDetector
=
"DetectorType"
;
...
...
@@ -40,11 +41,15 @@ InstrumentDecoder::InstrumentDecoder(const ghoul::Dictionary& dictionary)
{
bool
success
=
dictionary
.
getValue
(
keyDetector
,
_type
);
ghoul_assert
(
success
,
"Instrument has not provided detector type"
);
for_each
(
_type
.
begin
(),
_type
.
end
(),
[](
char
&
in
){
in
=
::
toupper
(
in
);
});
std
::
for_each
(
_type
.
begin
(),
_type
.
end
(),
[](
char
&
in
){
in
=
static_cast
<
char
>
(
toupper
(
in
));
}
);
if
(
!
dictionary
.
hasKeyAndValue
<
std
::
string
>
(
keyStopCommand
)
&&
_type
==
"SCANNER"
){
LWARNING
(
"Scanner must provide stop command, please check mod file."
);
}
else
{
}
else
{
dictionary
.
getValue
(
keyStopCommand
,
_stopCommand
);
}
...
...
This diff is collapsed.
Click to expand it.
modules/newhorizons/util/instrumentdecoder.h
+
1
-
0
View file @
9fcdd9f9
...
...
@@ -35,6 +35,7 @@ public:
virtual
std
::
string
getDecoderType
();
virtual
std
::
vector
<
std
::
string
>
getTranslation
();
std
::
string
getStopCommand
();
private:
std
::
string
_type
;
std
::
string
_stopCommand
;
...
...
This diff is collapsed.
Click to expand it.
modules/newhorizons/util/projectioncomponent.cpp
+
2
-
2
View file @
9fcdd9f9
...
...
@@ -196,8 +196,8 @@ void ProjectionComponent::initialize(const ghoul::Dictionary& dictionary) {
_instrumentID
=
dictionary
.
value
<
std
::
string
>
(
keyInstrument
);
_projectorID
=
dictionary
.
value
<
std
::
string
>
(
keyProjObserver
);
_projecteeID
=
dictionary
.
value
<
std
::
string
>
(
keyProjTarget
);
_fovy
=
dictionary
.
value
<
double
>
(
keyInstrumentFovy
);
_aspectRatio
=
dictionary
.
value
<
double
>
(
keyInstrumentAspect
);
_fovy
=
static_cast
<
float
>
(
dictionary
.
value
<
double
>
(
keyInstrumentFovy
)
)
;
_aspectRatio
=
static_cast
<
float
>
(
dictionary
.
value
<
double
>
(
keyInstrumentAspect
)
)
;
_aberration
=
SpiceManager
::
AberrationCorrection
(
dictionary
.
value
<
std
::
string
>
(
keyProjAberration
)
...
...
This diff is collapsed.
Click to expand it.
modules/onscreengui/src/gui.cpp
+
1
-
1
View file @
9fcdd9f9
...
...
@@ -602,7 +602,7 @@ void GUI::renderAndUpdatePropertyVisibility() {
// Array is sorted by importance
std
::
array
<
const
char
*
,
4
>
items
=
{
"None"
,
"User"
,
"Developer"
,
"All"
};
ImGui
::
Combo
(
"PropertyVisibility"
,
&
t
,
items
.
data
(),
items
.
size
());
ImGui
::
Combo
(
"PropertyVisibility"
,
&
t
,
items
.
data
(),
static_cast
<
int
>
(
items
.
size
())
)
;
_currentVisibility
=
static_cast
<
V
>
(
t
);
_globalProperty
.
setVisibility
(
_currentVisibility
);
...
...
This diff is collapsed.
Click to expand it.
modules/onscreengui/src/guiiswacomponent.cpp
+
0
-
1
View file @
9fcdd9f9
...
...
@@ -39,7 +39,6 @@
namespace
{
using
json
=
nlohmann
::
json
;
const
std
::
string
_loggerCat
=
"iSWAComponent"
;
const
ImVec2
size
=
ImVec2
(
350
,
500
);
}
namespace
openspace
{
...
...
This diff is collapsed.
Click to expand it.
modules/onscreengui/src/guiperformancecomponent.cpp
+
6
-
9
View file @
9fcdd9f9
...
...
@@ -89,9 +89,9 @@ void GuiPerformanceComponent::render() {
}
if
(
_sceneGraphIsEnabled
)
{
bool
v
=
_sceneGraphIsEnabled
;
ImGui
::
Begin
(
"SceneGraph"
,
&
v
);
_sceneGraphIsEnabled
=
v
;
bool
sge
=
_sceneGraphIsEnabled
;
ImGui
::
Begin
(
"SceneGraph"
,
&
sge
);
_sceneGraphIsEnabled
=
sge
;
// The indices correspond to the index into the average array further below
ImGui
::
Text
(
"Sorting"
);
...
...
@@ -399,9 +399,9 @@ void GuiPerformanceComponent::render() {
}
if
(
_functionsIsEnabled
)
{
bool
v
=
_functionsIsEnabled
;
ImGui
::
Begin
(
"Functions"
,
&
v
);
_functionsIsEnabled
=
v
;
bool
fe
=
_functionsIsEnabled
;
ImGui
::
Begin
(
"Functions"
,
&
fe
);
_functionsIsEnabled
=
fe
;
using
namespace
performance
;
for
(
int
i
=
0
;
i
<
layout
->
nFunctionEntries
;
++
i
)
{
...
...
@@ -422,9 +422,6 @@ void GuiPerformanceComponent::render() {
std
::
end
(
layout
->
functionEntries
[
i
].
time
)
);
const
PerformanceLayout
::
FunctionPerformanceLayout
&
f
=
layout
->
functionEntries
[
i
];
std
::
string
renderTime
=
std
::
to_string
(
entry
.
time
[
PerformanceLayout
::
NumberValues
-
1
]
)
+
"us"
;
...
...
This diff is collapsed.
Click to expand it.
modules/onscreengui/src/guipropertycomponent.cpp
+
8
-
8
View file @
9fcdd9f9
...
...
@@ -42,18 +42,18 @@ namespace {
int
nVisibleProperties
(
const
std
::
vector
<
properties
::
Property
*>&
properties
,
properties
::
Property
::
Visibility
visibility
)
{
return
std
::
count_if
(
return
static_cast
<
int
>
(
std
::
count_if
(
properties
.
begin
(),
properties
.
end
(),
[
visibility
](
properties
::
Property
*
p
)
{
using
V
=
properties
::
Property
::
Visibility
;
return
static_cast
<
std
::
underlying_type_t
<
V
>>
(
visibility
)
>=
static_cast
<
std
::
underlying_type_t
<
V
>>
(
p
->
visibility
());
}
);
}
using
V
=
properties
::
Property
::
Visibility
;
return
static_cast
<
std
::
underlying_type_t
<
V
>>
(
visibility
)
>=
static_cast
<
std
::
underlying_type_t
<
V
>>
(
p
->
visibility
());
}
));
}
}
// namespace
namespace
gui
{
...
...
This diff is collapsed.
Click to expand it.
modules/onscreengui/src/renderproperties.cpp
+
27
-
17
View file @
9fcdd9f9
...
...
@@ -172,9 +172,9 @@ void renderDoubleProperty(properties::Property* prop, const std::string& ownerNa
std
::
string
name
=
p
->
guiName
();
ImGui
::
PushID
((
ownerName
+
"."
+
name
).
c_str
());
float
value
=
*
p
;
float
min
=
p
->
minValue
();
float
max
=
p
->
maxValue
();
float
value
=
static_cast
<
float
>
(
*
p
)
;
float
min
=
static_cast
<
float
>
(
p
->
minValue
()
)
;
float
max
=
static_cast
<
float
>
(
p
->
maxValue
()
)
;
ImGui
::
SliderFloat
(
name
.
c_str
(),
&
value
,
min
,
max
,
"%.5f"
);
renderTooltip
(
prop
);
...
...
@@ -211,8 +211,8 @@ void renderIVec2Property(Property* prop, const std::string& ownerName) {
ImGui
::
PushID
((
ownerName
+
"."
+
name
).
c_str
());
IVec2Property
::
ValueType
value
=
*
p
;
floa
t
min
=
std
::
min
(
p
->
minValue
().
x
,
p
->
minValue
().
y
);
floa
t
max
=
std
::
max
(
p
->
maxValue
().
x
,
p
->
maxValue
().
y
);
in
t
min
=
std
::
min
(
p
->
minValue
().
x
,
p
->
minValue
().
y
);
in
t
max
=
std
::
max
(
p
->
maxValue
().
x
,
p
->
maxValue
().
y
);
ImGui
::
SliderInt2
(
name
.
c_str
(),
&
value
.
x
,
...
...
@@ -237,8 +237,8 @@ void renderIVec3Property(Property* prop, const std::string& ownerName) {
ImGui
::
PushID
((
ownerName
+
"."
+
name
).
c_str
());
IVec3Property
::
ValueType
value
=
*
p
;
floa
t
min
=
std
::
min
(
std
::
min
(
p
->
minValue
().
x
,
p
->
minValue
().
y
),
p
->
minValue
().
z
);
floa
t
max
=
std
::
max
(
std
::
max
(
p
->
maxValue
().
x
,
p
->
maxValue
().
y
),
p
->
maxValue
().
z
);
in
t
min
=
std
::
min
(
std
::
min
(
p
->
minValue
().
x
,
p
->
minValue
().
y
),
p
->
minValue
().
z
);
in
t
max
=
std
::
max
(
std
::
max
(
p
->
maxValue
().
x
,
p
->
maxValue
().
y
),
p
->
maxValue
().
z
);
ImGui
::
SliderInt3
(
name
.
c_str
(),
...
...
@@ -264,10 +264,10 @@ void renderIVec4Property(Property* prop, const std::string& ownerName) {
ImGui
::
PushID
((
ownerName
+
"."
+
name
).
c_str
());
IVec4Property
::
ValueType
value
=
*
p
;
floa
t
min
=
std
::
min
(
std
::
min
(
std
::
min
(
in
t
min
=
std
::
min
(
std
::
min
(
std
::
min
(
p
->
minValue
().
x
,
p
->
minValue
().
y
),
p
->
minValue
().
z
),
p
->
minValue
().
w
);
floa
t
max
=
std
::
max
(
std
::
max
(
std
::
max
(
in
t
max
=
std
::
max
(
std
::
max
(
std
::
max
(
p
->
maxValue
().
x
,
p
->
maxValue
().
y
),
p
->
maxValue
().
z
),
p
->
maxValue
().
w
);
...
...
@@ -406,8 +406,8 @@ void renderDVec2Property(Property* prop, const std::string& ownerName) {
ImGui
::
PushID
((
ownerName
+
"."
+
name
).
c_str
());
glm
::
vec2
value
=
glm
::
dvec2
(
*
p
);
float
min
=
std
::
min
(
p
->
minValue
().
x
,
p
->
minValue
().
y
);
float
max
=
std
::
max
(
p
->
maxValue
().
x
,
p
->
maxValue
().
y
);
float
min
=
static_cast
<
float
>
(
std
::
min
(
p
->
minValue
().
x
,
p
->
minValue
().
y
)
)
;
float
max
=
static_cast
<
float
>
(
std
::
max
(
p
->
maxValue
().
x
,
p
->
maxValue
().
y
)
)
;
ImGui
::
SliderFloat2
(
name
.
c_str
(),
&
value
.
x
,
...
...
@@ -433,8 +433,12 @@ void renderDVec3Property(Property* prop, const std::string& ownerName) {
ImGui
::
PushID
((
ownerName
+
"."
+
name
).
c_str
());
glm
::
vec3
value
=
glm
::
dvec3
(
*
p
);
float
min
=
std
::
min
(
std
::
min
(
p
->
minValue
().
x
,
p
->
minValue
().
y
),
p
->
minValue
().
z
);
float
max
=
std
::
max
(
std
::
max
(
p
->
maxValue
().
x
,
p
->
maxValue
().
y
),
p
->
maxValue
().
z
);
float
min
=
static_cast
<
float
>
(
std
::
min
(
std
::
min
(
p
->
minValue
().
x
,
p
->
minValue
().
y
),
p
->
minValue
().
z
)
);
float
max
=
static_cast
<
float
>
(
std
::
max
(
std
::
max
(
p
->
maxValue
().
x
,
p
->
maxValue
().
y
),
p
->
maxValue
().
z
)
);
bool
changed
=
ImGui
::
SliderFloat3
(
name
.
c_str
(),
...
...
@@ -463,10 +467,16 @@ void renderDVec4Property(Property* prop, const std::string& ownerName) {
ImGui
::
PushID
((
ownerName
+
"."
+
name
).
c_str
());
glm
::
vec4
value
=
glm
::
dvec4
(
*
p
);
float
min
=
std
::
min
(
std
::
min
(
std
::
min
(
p
->
minValue
().
x
,
p
->
minValue
().
y
),
p
->
minValue
().
z
),
p
->
minValue
().
w
);
float
max
=
std
::
max
(
std
::
max
(
std
::
max
(
p
->
maxValue
().
x
,
p
->
maxValue
().
y
),
p
->
maxValue
().
z
),
p
->
maxValue
().
w
);
float
min
=
static_cast
<
float
>
(
std
::
min
(
std
::
min
(
std
::
min
(
p
->
minValue
().
x
,
p
->
minValue
().
y
),
p
->
minValue
().
z
),
p
->
minValue
().
w
)
);
float
max
=
static_cast
<
float
>
(
std
::
max
(
std
::
max
(
std
::
max
(
p
->
maxValue
().
x
,
p
->
maxValue
().
y
),
p
->
maxValue
().
z
),
p
->
maxValue
().
w
)
);
ImGui
::
SliderFloat4
(
name
.
c_str
(),
...
...
This diff is collapsed.
Click to expand it.
src/mission/missionmanager.cpp
+
1
-
1
View file @
9fcdd9f9
...
...
@@ -64,7 +64,7 @@ void MissionManager::loadMission(const std::string& filename) {
ghoul_assert
(
FileSys
.
fileExists
(
filename
),
"filename must exist"
);
// Changing the values might invalidate the _currentMission iterator
std
::
string
currentMission
=
_c
urrentMission
!=
_missionMap
.
end
()
?
_currentMission
->
first
:
""
;
std
::
string
currentMission
=
hasC
urrentMission
()
?
_currentMission
->
first
:
""
;
Mission
mission
=
missionFromFile
(
filename
);
std
::
string
missionName
=
mission
.
name
();
...
...
This diff is collapsed.
Click to expand it.
src/util/spicemanager_lua.inl
+
2
-
2
View file @
9fcdd9f9
...
...
@@ -78,14 +78,14 @@ int unloadKernel(lua_State* L) {
if (isString) {
std::string argument = lua_tostring(L, -1);
SpiceManager::ref().unloadKernel(argument);
return 0;
}
if (isNumber) {
unsigned int argument = static_cast<unsigned int>(lua_tonumber(L, -1));
SpiceManager::ref().unloadKernel(argument);
return 0;
}
return 0;
}
} // luascriptfunctions
...
...
This diff is collapsed.
Click to expand it.
src/util/time.cpp
+
3
-
2
View file @
9fcdd9f9
...
...
@@ -78,8 +78,9 @@ Time Time::now() {
Time
now
;
time_t
secondsSince1970
;
secondsSince1970
=
time
(
nullptr
);
time_t
secondsInAYear
=
365.25
*
24
*
60
*
60
;
double
secondsSince2000
=
(
double
)(
secondsSince1970
-
30
*
secondsInAYear
);
const
time_t
secondsInAYear
=
static_cast
<
time_t
>
(
365.25
*
24
*
60
*
60
);
double
secondsSince2000
=
(
double
)(
secondsSince1970
-
30
*
secondsInAYear
);
now
.
setTime
(
secondsSince2000
);
return
now
;
}
...
...
This diff is collapsed.
Click to expand it.
tests/main.cpp
+
2
-
0
View file @
9fcdd9f9
...
...
@@ -26,7 +26,9 @@
// When running the unit tests we don't want to be asked what to do in the case of an
// assertion
#ifndef GHL_THROW_ON_ASSERT
#define GHL_THROW_ON_ASSERT
#endif // GHL_THROW_ON_ASSERTGHL_THROW_ON_ASSERT
#include
<ghoul/cmdparser/cmdparser>
#include
<ghoul/filesystem/filesystem>
...
...
This diff is collapsed.
Click to expand it.
tests/test_concurrentjobmanager.inl
+
0
-
3
View file @
9fcdd9f9
...
...
@@ -151,7 +151,4 @@ TEST_F(ConcurrentJobManagerTest, JobCreation) {
{
auto product = finishedJob->product();
}
int a;
}
This diff is collapsed.
Click to expand it.
tests/test_spicemanager.inl
+
66
-
10
View file @
9fcdd9f9
...
...
@@ -46,11 +46,12 @@ protected:
#define TYPLEN 32
#define SRCLEN 128
const int nrMetaKernels = 9;
SpiceInt which, handle, count = 0;
char file[FILLEN], filtyp[TYPLEN], source[SRCLEN];
double abs_error = 0.00001;
namespace spicemanager_constants {
const int nrMetaKernels = 9;
SpiceInt which, handle, count = 0;
char file[FILLEN], filtyp[TYPLEN], source[SRCLEN];
double abs_error = 0.00001;
} // namespace spicemanager_constants
// In this testclass only a handset of the testfunctions require a single kernel.
// The remaining methods rely on multiple kernels, loaded as a SPICE 'meta-kernel'.
...
...
@@ -132,7 +133,18 @@ TEST_F(SpiceManagerTest, loadSingleKernel) {
loadLSKKernel();
// naif0008.tls is a text file, check if loaded.
SpiceBoolean found;
kdata_c(0, "text", FILLEN, TYPLEN, SRCLEN, file, filtyp, source, &handle, &found);
kdata_c(
0,
"text",
FILLEN,
TYPLEN,
SRCLEN,
spicemanager_constants::file,
spicemanager_constants::filtyp,
spicemanager_constants::source,
&spicemanager_constants::handle,
&found
);
ASSERT_TRUE(found == SPICETRUE) << "Kernel not loaded";
}
...
...
@@ -142,14 +154,36 @@ TEST_F(SpiceManagerTest, unloadKernelString) {
loadLSKKernel();
// naif0008.tls is a text file, check if loaded.
SpiceBoolean found;
kdata_c(0, "text", FILLEN, TYPLEN, SRCLEN, file, filtyp, source, &handle, &found);
kdata_c(
0,
"text",
FILLEN,
TYPLEN,
SRCLEN,
spicemanager_constants::file,
spicemanager_constants::filtyp,
spicemanager_constants::source,
&spicemanager_constants::handle,
&found
);
ASSERT_TRUE(found == SPICETRUE);
// unload using string keyword
openspace::SpiceManager::ref().unloadKernel(LSK);
found = SPICEFALSE;
kdata_c(0, "text", FILLEN, TYPLEN, SRCLEN, file, filtyp, source, &handle, &found);
kdata_c(
0,
"text",
FILLEN,
TYPLEN,
SRCLEN,
spicemanager_constants::file,
spicemanager_constants::filtyp,
spicemanager_constants::source,
&spicemanager_constants::handle,
&found
);
EXPECT_FALSE(found == SPICETRUE);
}
...
...
@@ -158,14 +192,36 @@ TEST_F(SpiceManagerTest, unloadKernelInteger) {
int kernelID = loadLSKKernel();
// naif0008.tls is a text file, check if loaded.
SpiceBoolean found;
kdata_c(0, "text", FILLEN, TYPLEN, SRCLEN, file, filtyp, source, &handle, &found);
kdata_c(
0,
"text",
FILLEN,
TYPLEN,
SRCLEN,
spicemanager_constants::file,
spicemanager_constants::filtyp,
spicemanager_constants::source,
&spicemanager_constants::handle,
&found
);
ASSERT_TRUE(found == SPICETRUE);
// unload using unique int ID
openspace::SpiceManager::ref().unloadKernel(kernelID);
found = SPICEFALSE;
kdata_c(0, "text", FILLEN, TYPLEN, SRCLEN, file, filtyp, source, &handle, &found);
kdata_c(
0,
"text",
FILLEN,
TYPLEN,
SRCLEN,
spicemanager_constants::file,
spicemanager_constants::filtyp,
spicemanager_constants::source,
&spicemanager_constants::handle,
&found
);
EXPECT_FALSE(found == SPICETRUE) << "One or more kernels still present in kernel-pool";
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help