Skip to content

Commit

Permalink
[TESTS] Stabilizing master branch (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
demid5111 committed Jun 11, 2022
1 parent cfd07e8 commit c4f5fa7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/main/java/dss/lingvo/samples/TT2HFLTSCoordinator.java
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ private void processMultiLevelAdvancedSample(File inputFile, File outputDirector
System.out.println("\n\n\n[MULTILEVEL] [REPORT] Aggregation results");
for (Pair<String, TT2HFLTS> stringTT2HFLTSPair : resZippedVec) {
TTAlternativeModel altInstance = model.getAlternatives().stream().filter((TTAlternativeModel ttAlternativeModel) -> ttAlternativeModel.getAlternativeID().equals(stringTT2HFLTSPair.getKey())).findFirst().orElse(null);
System.out.println(stringTT2HFLTSPair.getKey() + ' ' + altInstance.getAlternativeName());
System.out.println(stringTT2HFLTSPair.getKey() + ' ' + altInstance.getAlternativeName() + ' ' + stringTT2HFLTSPair.getValue().toString());
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/main/java/dss/lingvo/t2/TTTuple.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public float getTranslation() {

@Override
public String toString(){
return "<2Tuple> { label: " + this.myLabel + "; translation: " + this.myTranslation +"; }";
return "<2Tuple> { label: " + this.myLabel + "; index: " + this.index
+ "; translation: " + this.myTranslation +"; }";
}

public int getIndex() {
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/dss/lingvo/t2/TTTupleTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public void testToString() throws Exception {

String res = tmp.toString();

assertEquals("<2Tuple> { label: 5; translation: -0.5; }", res);
assertEquals("<2Tuple> { label: 5; index: 5; translation: -0.5; }", res);
}

@Test
Expand Down
5 changes: 4 additions & 1 deletion src/test/java/dss/lingvo/t2hflts/TT2HFLTSTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,10 @@ public void testEquals3() throws Exception {

@Test
public void testToString() throws Exception {
assertEquals("<2Tuple> { label: 2; translation: 0.0; }<2Tuple> { label: 3; translation: 0.0; }<2Tuple> { label: 4; translation: 0.0; }", myHFLTS1.toString());
assertEquals("" +
"<2Tuple> { label: 2; index: 2; translation: 0.0; }" +
"<2Tuple> { label: 3; index: 3; translation: 0.0; }" +
"<2Tuple> { label: 4; index: 4; translation: 0.0; }", myHFLTS1.toString());
}

@Test
Expand Down

0 comments on commit c4f5fa7

Please sign in to comment.