Merge branch 'master' into i18n
# Conflicts: # org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/instance/InstanceValidator.java
This commit is contained in:
commit
d84f93e8a8
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>4.2.3-SNAPSHOT</version>
|
||||
<version>4.2.4-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>4.2.3-SNAPSHOT</version>
|
||||
<version>4.2.4-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>4.2.3-SNAPSHOT</version>
|
||||
<version>4.2.4-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>4.2.3-SNAPSHOT</version>
|
||||
<version>4.2.4-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>4.2.3-SNAPSHOT</version>
|
||||
<version>4.2.4-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>4.2.3-SNAPSHOT</version>
|
||||
<version>4.2.4-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ import java.io.FileNotFoundException;
|
|||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -41,6 +42,7 @@ import org.hl7.fhir.r5.model.Parameters;
|
|||
import org.hl7.fhir.utilities.CSFile;
|
||||
import org.hl7.fhir.utilities.TextFile;
|
||||
import org.hl7.fhir.utilities.Utilities;
|
||||
import org.hl7.fhir.utilities.VersionUtilities;
|
||||
import org.hl7.fhir.utilities.cache.PackageCacheManager;
|
||||
import org.hl7.fhir.utilities.cache.ToolsVersion;
|
||||
|
||||
|
@ -59,22 +61,28 @@ import com.google.gson.JsonSyntaxException;
|
|||
public class TestingUtilities {
|
||||
private static final boolean SHOW_DIFF = true;
|
||||
|
||||
static public IWorkerContext fcontext;
|
||||
static public Map<String, IWorkerContext> fcontexts;
|
||||
|
||||
public static IWorkerContext context() {
|
||||
if (fcontext == null) {
|
||||
return context("4.0.1");
|
||||
}
|
||||
public static IWorkerContext context(String version) {
|
||||
if (fcontexts == null) {
|
||||
fcontexts = new HashMap<>();
|
||||
}
|
||||
if (!fcontexts.containsKey(version)) {
|
||||
PackageCacheManager pcm;
|
||||
try {
|
||||
pcm = new PackageCacheManager(true, ToolsVersion.TOOLS_VERSION);
|
||||
fcontext = SimpleWorkerContext.fromPackage(pcm.loadPackage("hl7.fhir.r4.core", "4.0.1"));
|
||||
IWorkerContext fcontext = SimpleWorkerContext.fromPackage(pcm.loadPackage(VersionUtilities.packageForVersion(version), version));
|
||||
fcontext.setUcumService(new UcumEssenceService(TestingUtilities.loadTestResourceStream("ucum", "ucum-essence.xml")));
|
||||
fcontext.setExpansionProfile(new Parameters());
|
||||
fcontexts.put(version, fcontext);
|
||||
} catch (Exception e) {
|
||||
throw new Error(e);
|
||||
}
|
||||
|
||||
}
|
||||
return fcontext;
|
||||
return fcontexts.get(version);
|
||||
}
|
||||
static public boolean silent;
|
||||
|
||||
|
|
|
@ -108,6 +108,8 @@ public class SnapShotGenerationTests {
|
|||
private boolean fail;
|
||||
private boolean newSliceProcessing;
|
||||
private boolean debug;
|
||||
private String version;
|
||||
|
||||
private List<Rule> rules = new ArrayList<>();
|
||||
private StructureDefinition source;
|
||||
private StructureDefinition included;
|
||||
|
@ -121,6 +123,11 @@ public class SnapShotGenerationTests {
|
|||
fail = "true".equals(test.getAttribute("fail"));
|
||||
newSliceProcessing = !"false".equals(test.getAttribute("new-slice-processing"));
|
||||
debug = "true".equals(test.getAttribute("debug"));
|
||||
if (test.hasAttribute("version")) {
|
||||
version = test.getAttribute("version");
|
||||
} else {
|
||||
version = "4.0.1";
|
||||
}
|
||||
|
||||
id = test.getAttribute("id");
|
||||
include = test.getAttribute("include");
|
||||
|
@ -493,7 +500,7 @@ public class SnapShotGenerationTests {
|
|||
throw new Exception("URL mismatch on base: "+base.getUrl()+" wanting "+test.getSource().getBaseDefinition());
|
||||
|
||||
StructureDefinition output = test.getSource().copy();
|
||||
ProfileUtilities pu = new ProfileUtilities(TestingUtilities.context(), messages , new TestPKP());
|
||||
ProfileUtilities pu = new ProfileUtilities(TestingUtilities.context(test.version), messages , new TestPKP());
|
||||
pu.setNewSlicingProcessing(test.isNewSliceProcessing());
|
||||
pu.setThrowException(false);
|
||||
pu.setDebug(test.isDebug());
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>4.2.3-SNAPSHOT</version>
|
||||
<version>4.2.4-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>4.2.3-SNAPSHOT</version>
|
||||
<version>4.2.4-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<groupId>ca.uhn.hapi.fhir</groupId>
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
<version>4.2.3-SNAPSHOT</version>
|
||||
<version>4.2.4-SNAPSHOT</version>
|
||||
<relativePath>../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -118,7 +118,10 @@ public class ValidationTestSuite implements IEvaluationContext, IValidatorResour
|
|||
}
|
||||
vCurr = ve.get(v);
|
||||
vCurr.setFetcher(this);
|
||||
TestingUtilities.fcontext = vCurr.getContext();
|
||||
if (TestingUtilities.fcontexts == null) {
|
||||
TestingUtilities.fcontexts = new HashMap<>();
|
||||
}
|
||||
TestingUtilities.fcontexts.put(v, vCurr.getContext());
|
||||
|
||||
if (content.has("use-test") && !content.get("use-test").getAsBoolean())
|
||||
return;
|
||||
|
|
4
pom.xml
4
pom.xml
|
@ -13,11 +13,11 @@
|
|||
each other. It is fine to bump the point version of this POM without affecting
|
||||
HAPI FHIR.
|
||||
-->
|
||||
<version>4.2.3-SNAPSHOT</version>
|
||||
<version>4.2.4-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<hapi_fhir_version>4.2.0</hapi_fhir_version>
|
||||
<validator_test_case_version>1.0.43-SNAPSHOT</validator_test_case_version>
|
||||
<validator_test_case_version>1.0.44-SNAPSHOT</validator_test_case_version>
|
||||
</properties>
|
||||
|
||||
<artifactId>org.hl7.fhir.core</artifactId>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
@echo off
|
||||
|
||||
set oldver=4.2.2
|
||||
set newver=4.2.3
|
||||
set oldver=4.2.3
|
||||
set newver=4.2.4
|
||||
|
||||
echo ..
|
||||
echo =========================================================================
|
||||
|
|
Loading…
Reference in New Issue