more test fixes
This commit is contained in:
parent
a04b900054
commit
f5c592fbad
|
@ -3119,8 +3119,8 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||
|
||||
|
||||
public void sortDifferential(StructureDefinition base, StructureDefinition diff, String name, List<String> errors) throws FHIRException {
|
||||
|
||||
final List<ElementDefinition> diffList = diff.getDifferential().getElement();
|
||||
int lastCount = diffList.size();
|
||||
// first, we move the differential elements into a tree
|
||||
if (diffList.isEmpty())
|
||||
return;
|
||||
|
@ -3160,6 +3160,9 @@ public class ProfileUtilities extends TranslatingUtilities {
|
|||
// now, we serialise them back to a list
|
||||
diffList.clear();
|
||||
writeElements(edh, diffList);
|
||||
|
||||
if (lastCount != diffList.size())
|
||||
errors.add("Sort failed: counts differ; at least one of the paths in the differential is illegal");
|
||||
}
|
||||
|
||||
private int processElementsIntoTree(ElementDefinitionHolder edh, int i, List<ElementDefinition> list) {
|
||||
|
|
|
@ -344,8 +344,6 @@ public class SnapShotGenerationTests {
|
|||
pu.sortDifferential(base, output, source.getName(), errors);
|
||||
if (errors.size() > 0)
|
||||
throw new FHIRException("Sort failed: "+errors.toString());
|
||||
if (lastCount != output.getDifferential().getElement().size())
|
||||
throw new FHIRException("Sort failed: counts differ; at least one of the paths in the differential is illegal");
|
||||
|
||||
}
|
||||
pu.generateSnapshot(base, output, source.getUrl(), source.getName());
|
||||
|
|
Loading…
Reference in New Issue