Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
isochrone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Institut für Informatik
dbis
dbis-isochrone
isochrone
Commits
16338bf6
Commit
16338bf6
authored
10 years ago
by
User expired
Browse files
Options
Downloads
Patches
Plain Diff
fix broken tests
parent
175da22b
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/it/unibz/inf/isochrone/network/ComparisonTest.java
+13
-4
13 additions, 4 deletions
...t/java/it/unibz/inf/isochrone/network/ComparisonTest.java
with
13 additions
and
4 deletions
src/test/java/it/unibz/inf/isochrone/network/ComparisonTest.java
+
13
−
4
View file @
16338bf6
...
...
@@ -16,6 +16,7 @@ import java.util.HashMap;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Set
;
import
java.util.SortedSet
;
import
java.util.TreeSet
;
import
org.slf4j.Logger
;
...
...
@@ -158,12 +159,20 @@ public final class ComparisonTest {
LOGGER
.
debug
(
" - comparing for isochrone duration: "
+
params
.
getDuration
());
final
MemoryOutput
o1
=
AlgorithmHelper
.
run
(
clazz1
,
params
).
getOutput
();
final
MemoryOutput
o2
=
AlgorithmHelper
.
run
(
clazz2
,
params
).
getOutput
();
final
Collection
<
Link
>
l1
=
o1
.
getLinks
();
final
Collection
<
Link
>
l2
=
o2
.
getLinks
();
Assert
.
assertEquals
(
l1
,
l2
,
n1
+
" != "
+
n2
);
Assert
.
assertEquals
(
getIds
(
o1
.
getNodes
()),
getIds
(
o2
.
getNodes
()),
"Nodes for class \""
+
n1
+
"\""
+
" != nodes for class \""
+
n2
+
"\""
);
Assert
.
assertEquals
(
getIds
(
o1
.
getLinks
()),
getIds
(
o2
.
getLinks
()),
"Links for class \""
+
n1
+
"\""
+
" != links for class \""
+
n2
+
"\""
);
}
LOGGER
.
info
(
"-----------------------------"
);
}
}
private
static
Collection
<
Integer
>
getIds
(
final
Collection
<?
extends
NetworkEntity
>
l1
)
{
final
SortedSet
<
Integer
>
i1
=
new
TreeSet
<>();
for
(
final
NetworkEntity
l
:
l1
)
{
i1
.
add
(
l
.
getId
());
}
return
i1
;
}
}
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