Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
Rugged
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Orekit
Rugged
Commits
eb59f4d0
Commit
eb59f4d0
authored
6 years ago
by
Guylaine Prat
Browse files
Options
Downloads
Patches
Plain Diff
Improve tests coverage
parent
a3a10418
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/test/java/org/orekit/rugged/api/RuggedTest.java
+29
-0
29 additions, 0 deletions
src/test/java/org/orekit/rugged/api/RuggedTest.java
src/test/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTileTest.java
+20
-2
20 additions, 2 deletions
...kit/rugged/intersection/duvenhage/MinMaxTreeTileTest.java
with
49 additions
and
2 deletions
src/test/java/org/orekit/rugged/api/RuggedTest.java
+
29
−
0
View file @
eb59f4d0
...
...
@@ -18,6 +18,7 @@ package org.orekit.rugged.api;
import
static
org
.
junit
.
Assert
.
assertEquals
;
import
static
org
.
junit
.
Assert
.
assertNull
;
import
static
org
.
junit
.
Assert
.
assertTrue
;
import
java.io.File
;
...
...
@@ -1479,6 +1480,34 @@ public class RuggedTest {
assertEquals
(
sp
.
getPixelNumber
(),
spChangeLines
.
getPixelNumber
(),
1
.
e
-
9
);
assertEquals
(
sp
.
getLineNumber
(),
spChangeLines
.
getLineNumber
(),
1
.
e
-
9
);
// For computeInverseLocOnGridWithoutAtmosphere special cases
try
{
java
.
lang
.
reflect
.
Method
computeWithoutAtmosphere
=
rugged
.
getClass
().
getDeclaredMethod
(
"computeInverseLocOnGridWithoutAtmosphere"
,
GeodeticPoint
[][].
class
,
Integer
.
TYPE
,
Integer
.
TYPE
,
LineSensor
.
class
,
Integer
.
TYPE
,
Integer
.
TYPE
);
computeWithoutAtmosphere
.
setAccessible
(
true
);
final
int
nbPixelGrid
=
2
;
final
int
nbLineGrid
=
2
;
GeodeticPoint
[][]
groundGridWithAtmosphere
=
new
GeodeticPoint
[
nbPixelGrid
][
nbLineGrid
];
for
(
int
i
=
0
;
i
<
nbPixelGrid
;
i
++)
{
for
(
int
j
=
0
;
j
<
nbLineGrid
;
j
++)
{
groundGridWithAtmosphere
[
i
][
j
]
=
null
;
}
}
SensorPixel
[][]
spNull
=
(
SensorPixel
[][])
computeWithoutAtmosphere
.
invoke
(
rugged
,
groundGridWithAtmosphere
,
nbPixelGrid
,
nbLineGrid
,
lineSensor
,
minLine
,
maxLine
);
for
(
int
i
=
0
;
i
<
nbPixelGrid
;
i
++)
{
for
(
int
j
=
0
;
j
<
nbLineGrid
;
j
++)
{
assertNull
(
spNull
[
i
][
j
]);
}
}
}
catch
(
NoSuchMethodException
|
SecurityException
|
IllegalAccessException
|
IllegalArgumentException
|
InvocationTargetException
e
)
{
Assert
.
fail
(
e
.
getLocalizedMessage
());
}
}
...
...
This diff is collapsed.
Click to expand it.
src/test/java/org/orekit/rugged/intersection/duvenhage/MinMaxTreeTileTest.java
+
20
−
2
View file @
eb59f4d0
...
...
@@ -16,13 +16,17 @@
*/
package
org.orekit.rugged.intersection.duvenhage
;
import
java.lang.reflect.Field
;
import
org.hipparchus.random.RandomGenerator
;
import
org.hipparchus.random.Well1024a
;
import
org.hipparchus.util.FastMath
;
import
java.io.IOException
;
import
java.lang.reflect.Field
;
import
org.junit.Assert
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.rules.TemporaryFolder
;
public
class
MinMaxTreeTileTest
{
...
...
@@ -264,6 +268,17 @@ public class MinMaxTreeTileTest {
}
}
@Test
public
void
testForCoverage
()
throws
IOException
{
org
.
orekit
.
rugged
.
errors
.
DumpManager
.
activate
(
tempFolder
.
newFile
());
MinMaxTreeTile
tile
=
createTile
(
1201
,
1201
);
tile
.
getMinElevation
(
100
,
100
,
0
);
org
.
orekit
.
rugged
.
errors
.
DumpManager
.
deactivate
();
}
private
int
[]
neighbors
(
int
row
,
int
column
,
int
nbRows
,
int
nbColumns
,
int
stages
)
{
// poor man identification of neighbors cells merged together with specified cell
...
...
@@ -345,5 +360,8 @@ public class MinMaxTreeTileTest {
tile
.
tileUpdateCompleted
();
return
tile
;
}
@Rule
public
TemporaryFolder
tempFolder
=
new
TemporaryFolder
();
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment