Skip to content

Commit b99e061

Browse files
committed
Fixing tests: order of AbstractScoresCache.getScores wasn't guaranteed
and the test was failing in some computers
1 parent d8c5d2f commit b99e061

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

biojava-structure/src/main/java/org/biojava/nbio/structure/align/multiple/AbstractScoresCache.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
package org.biojava.nbio.structure.align.multiple;
22

33
import java.util.Collections;
4-
import java.util.HashMap;
54
import java.util.Map;
65
import java.util.Set;
6+
import java.util.TreeMap;
77

88
/**
99
* Abstact implementation of the {@link ScoresCache} with the shared code used
@@ -26,7 +26,7 @@ protected AbstractScoresCache(AbstractScoresCache cache) {
2626
@Override
2727
public void putScore(String property, Double score) {
2828
if(scores == null) {
29-
scores = new HashMap<String, Double>();
29+
scores = new TreeMap<String, Double>();
3030
}
3131
scores.put(property, score);
3232
}

biojava-structure/src/test/resources/testMSTA1.fatcat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ BlockSets: 2
44
Blocks: 4
55
Length: 40
66
Core Length: 7
7-
RMSD: 14.53
8-
AvgTM-score: 0.01
7+
AvgTM-score: 0.01
8+
RMSD: 14.53
99

1010
Chain 01: ---S-tDaErLkhl--IvTpSgAgeq----NmIgMtPt-viAv---HyL-dEt-eqWe
1111
11 1 1111111 2222222222 33333333 3 3 4444 444 4 44

biojava-structure/src/test/resources/testMSTA1.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@
6666
<ScoresCache />
6767
</BlockSet>
6868
<ScoresCache>
69-
<RMSD value="14.534137323749885" />
7069
<AvgTM-score value="0.011220778229159392" />
70+
<RMSD value="14.534137323749885" />
7171
</ScoresCache>
7272
</MultipleAlignment>
7373
<ScoresCache />

biojava-structure/src/test/resources/testMSTA2.fatcat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ BlockSets: 2
44
Blocks: 3
55
Length: 43
66
Core Length: 39
7-
RMSD: 1.62
8-
AvgTM-score: 0.21
7+
AvgTM-score: 0.21
8+
RMSD: 1.62
99

1010
Chain 01: VLSEGEWQLVLHVWAKVEADVAghgqdil--IRLFKSHPeTlekfdrfkhlkteaemkasedlkkhgvtvltalgailkkkghheaelkplaqshatkhkipikylefiseaiihvlhsrhpgdf-GADAQGAMNKAL
1111
1111111111111111111111 22222222 2 333333333333

biojava-structure/src/test/resources/testMSTA2.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@
6868
<ScoresCache />
6969
</BlockSet>
7070
<ScoresCache>
71-
<RMSD value="1.6157522409255982" />
7271
<AvgTM-score value="0.20901795047594007" />
72+
<RMSD value="1.6157522409255982" />
7373
</ScoresCache>
7474
</MultipleAlignment>
7575
<ScoresCache />

0 commit comments

Comments
 (0)