Ajout finalisation test Solving Time
This commit is contained in:
parent
268ed91e85
commit
ac09b33f99
1 changed files with 4 additions and 6 deletions
|
@ -131,11 +131,9 @@ public class DijkstraAlgorithmTest {
|
||||||
ShortestPathAlgorithm A_star= new AStarAlgorithm(data);
|
ShortestPathAlgorithm A_star= new AStarAlgorithm(data);
|
||||||
ShortestPathSolution soluce_Dijkstra= Dijkstra.run();
|
ShortestPathSolution soluce_Dijkstra= Dijkstra.run();
|
||||||
ShortestPathSolution soluce_Astar= A_star.run();
|
ShortestPathSolution soluce_Astar= A_star.run();
|
||||||
boolean result = false;
|
|
||||||
if (soluce_Dijkstra.getSolvingTime().toSeconds() > soluce_Astar.getSolvingTime().toSeconds()){
|
assertTrue(Long.compare(soluce_Dijkstra.getSolvingTime().toSeconds(),soluce_Astar.getSolvingTime().toSeconds())>=0);
|
||||||
result = true;
|
|
||||||
}
|
|
||||||
assertTrue(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -162,7 +160,7 @@ public class DijkstraAlgorithmTest {
|
||||||
@Test
|
@Test
|
||||||
public void Carte_Time() throws Exception{
|
public void Carte_Time() throws Exception{
|
||||||
|
|
||||||
//Nous allons cherche lee chemin et la carte a analyser
|
//Nous allons cherche le chemin et la carte a analyser
|
||||||
final String map_c = "/mnt/commetud/3eme Annee MIC/Graphes-et-Algorithmes/Maps/carre-dense.mapgr";
|
final String map_c = "/mnt/commetud/3eme Annee MIC/Graphes-et-Algorithmes/Maps/carre-dense.mapgr";
|
||||||
final GraphReader reader = new BinaryGraphReader(new DataInputStream(new BufferedInputStream(new FileInputStream(map_c))));
|
final GraphReader reader = new BinaryGraphReader(new DataInputStream(new BufferedInputStream(new FileInputStream(map_c))));
|
||||||
Graph graph_c = reader.read();
|
Graph graph_c = reader.read();
|
||||||
|
|
Loading…
Reference in a new issue