Skip to content

Commit

Permalink
Fixed failing command line tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tsantalis committed Feb 15, 2024
1 parent cad28ed commit 3288340
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3056,6 +3056,7 @@ public boolean allMappingsHaveSameDepthAndIndex() {
int count = 0;
int compositeCount = 0;
int identicalCompositeCount = 0;
int identicalLeafCount = 0;
for(AbstractCodeMapping mapping : mappings) {
AbstractCodeFragment f1 = mapping.getFragment1();
AbstractCodeFragment f2 = mapping.getFragment2();
Expand All @@ -3067,9 +3068,14 @@ public boolean allMappingsHaveSameDepthAndIndex() {
identicalCompositeCount++;
}
}
else if(f1 instanceof StatementObject && f2 instanceof StatementObject) {
if(f1.getString().equals(f2.getString())) {
identicalLeafCount++;
}
}
}
}
if(count == mappings.size() && compositeCount == identicalCompositeCount && compositeCount > 0) {
if(count == mappings.size() && compositeCount == identicalCompositeCount && compositeCount > 0 && identicalLeafCount > 0) {
return true;
}
}
Expand Down

0 comments on commit 3288340

Please sign in to comment.