Skip to content

Commit 456c382

Browse files
committed
Fix feature tests
1 parent 2b01507 commit 456c382

File tree

14 files changed

+5
-4
lines changed

14 files changed

+5
-4
lines changed

veraPDF-integration/src/test/java/org/verapdf/integration/tests/FeatureTest.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public class FeatureTest {
4343
private static Stack<String> failMessages = new Stack<>();
4444
private static final Map<String, FeatureObjectType> FILES_FEATURES_MAP = new HashMap<>();
4545
private static final List<FeatureTestResult> results;
46-
private static final String PATH_FORMAT = "src/test/resources/test-resources/feature-tests/%s.pdf";
46+
private static final String PATH_FORMAT = "test-resources/feature-tests/%s.pdf";
4747

4848
static {
4949
FILES_FEATURES_MAP.put("Annotations", FeatureObjectType.ANNOTATION);
@@ -74,7 +74,7 @@ public void testFeatures() throws IOException {
7474
}
7575
}
7676
outputResults();
77-
// Assert.assertEquals("Exceptions during feature detection", 0, exceptionsCount);
77+
Assert.assertEquals("Exceptions during feature detection", 0, exceptionsCount);
7878
}
7979

8080
public static void outputResults() throws IOException {
@@ -92,7 +92,8 @@ public static void outputResults() throws IOException {
9292
}
9393

9494
private void testFile(Map.Entry<String, FeatureObjectType> file) {
95-
File testFile = new File(String.format(PATH_FORMAT, file.getKey()));
95+
File testFile = new File(this.getClass().getResource(String.format(PATH_FORMAT, file.getKey())).getFile());
96+
System.out.println(testFile.getName());
9697
FeatureExtractorConfig config;
9798
FeatureExtractionResult gfFeatures;
9899
try {
@@ -101,7 +102,7 @@ private void testFile(Map.Entry<String, FeatureObjectType> file) {
101102
GFModelParser gfParser = GFModelParser.createModelWithFlavour(testFile, PDFAFlavour.NO_FLAVOUR);
102103
gfFeatures = gfParser.getFeatures(config);
103104
} catch (Throwable t) {
104-
LOGGER.log(Level.WARNING, "Exception during feature processing " + t.getMessage());
105+
LOGGER.log(Level.WARNING, "Exception during feature processing " + t.getMessage(), t);
105106
throw new RuntimeException("greenfield exception: " + t.getMessage(), t);
106107
}
107108
}

veraPDF-integration/src/test/resources/test-resources/feature-tests/Annotations.pdf renamed to veraPDF-integration/src/test/resources/org/verapdf/integration/tests/test-resources/feature-tests/Annotations.pdf

File renamed without changes.

veraPDF-integration/src/test/resources/test-resources/feature-tests/ColorSpaces.pdf renamed to veraPDF-integration/src/test/resources/org/verapdf/integration/tests/test-resources/feature-tests/ColorSpaces.pdf

File renamed without changes.

veraPDF-integration/src/test/resources/test-resources/feature-tests/Font.pdf renamed to veraPDF-integration/src/test/resources/org/verapdf/integration/tests/test-resources/feature-tests/Font.pdf

File renamed without changes.

veraPDF-integration/src/test/resources/test-resources/feature-tests/Forms.pdf renamed to veraPDF-integration/src/test/resources/org/verapdf/integration/tests/test-resources/feature-tests/Forms.pdf

File renamed without changes.

veraPDF-integration/src/test/resources/test-resources/feature-tests/ICC_CMYK.pdf renamed to veraPDF-integration/src/test/resources/org/verapdf/integration/tests/test-resources/feature-tests/ICC_CMYK.pdf

File renamed without changes.

veraPDF-integration/src/test/resources/test-resources/feature-tests/ICC_GRAY.pdf renamed to veraPDF-integration/src/test/resources/org/verapdf/integration/tests/test-resources/feature-tests/ICC_GRAY.pdf

File renamed without changes.

veraPDF-integration/src/test/resources/test-resources/feature-tests/ICC_RGB.pdf renamed to veraPDF-integration/src/test/resources/org/verapdf/integration/tests/test-resources/feature-tests/ICC_RGB.pdf

File renamed without changes.

veraPDF-integration/src/test/resources/test-resources/feature-tests/InfoDictionary.pdf renamed to veraPDF-integration/src/test/resources/org/verapdf/integration/tests/test-resources/feature-tests/InfoDictionary.pdf

File renamed without changes.

veraPDF-integration/src/test/resources/test-resources/feature-tests/Outlines.pdf renamed to veraPDF-integration/src/test/resources/org/verapdf/integration/tests/test-resources/feature-tests/Outlines.pdf

File renamed without changes.

0 commit comments

Comments
 (0)