Skip to content

Commit

Permalink
Remove integration test for mapref
Browse files Browse the repository at this point in the history
Signed-off-by: Jarno Elovirta <[email protected]>
  • Loading branch information
jelovirt committed Jan 27, 2024
1 parent 4df2b87 commit 3531736
Show file tree
Hide file tree
Showing 67 changed files with 8 additions and 1,029 deletions.
38 changes: 0 additions & 38 deletions src/test/java/org/dita/dost/IntegrationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,33 +131,6 @@ public void testconrefend() throws Throwable {
builder().name(Paths.get("conref", "conrefend")).transtype(PREPROCESS).input(Paths.get("range.ditamap")).test();
}

@Test
public void testmapref_topicrefID() throws Throwable {
builder()
.name(Paths.get("mapref", "mapref_topicrefID"))
.transtype(PREPROCESS)
.input(Paths.get("bookmap.ditamap"))
.test();
}

@Test
public void testmapref_to_conref() throws Throwable {
builder()
.name(Paths.get("mapref", "mapref_to_conref"))
.transtype(PREPROCESS)
.input(Paths.get("root.ditamap"))
.test();
}

@Test
public void testmapref_reltables() throws Throwable {
builder()
.name(Paths.get("mapref", "mapref_reltables"))
.transtype(PREPROCESS)
.input(Paths.get("main.ditamap"))
.test();
}

@Test
public void testcoderef_source() throws Throwable {
builder()
Expand Down Expand Up @@ -305,17 +278,6 @@ public void testkeyrefKeywordConref() throws Throwable {
builder().name(Paths.get("keyref", "keyword_conref")).transtype(PREPROCESS).input(Paths.get("test.ditamap")).test();
}

@Test
public void testmapref() throws Throwable {
builder()
.name(Paths.get("mapref", "basic"))
.transtype(PREPROCESS)
.input(Paths.get("test.ditamap"))
.put("generate-debug-attributes", "false")
.errorCount(0)
.test();
}

@Test
public void testuplevelslink() throws Throwable {
builder()
Expand Down
12 changes: 0 additions & 12 deletions src/test/java/org/dita/dost/IntegrationTestPreprocess2.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,6 @@ public void testconrefmissingfile() throws Throwable {
.test();
}

@Test
public void testmapref() throws Throwable {
builder()
.name(Paths.get("mapref", "basic"))
.transtype(PREPROCESS)
.input(Paths.get("test.ditamap"))
.put("generate-debug-attributes", "false")
.errorCount(3)
.warnCount(1)
.test();
}

@Disabled
@Test
public void testcopyto_linktarget() throws Throwable {
Expand Down
11 changes: 0 additions & 11 deletions src/test/java/org/dita/dost/IntegrationTestXhtml.java
Original file line number Diff line number Diff line change
Expand Up @@ -330,17 +330,6 @@ public void testlang() throws Throwable {
.test();
}

@Test
public void testmapref() throws Throwable {
builder()
.name(Paths.get("mapref", "basic"))
.transtype(PREPROCESS)
.input(Paths.get("test.ditamap"))
.put("generate-debug-attributes", "false")
.errorCount(0)
.test();
}

@Test
public void testsubjectschema_case() throws Throwable {
builder()
Expand Down
10 changes: 7 additions & 3 deletions src/test/java/org/dita/dost/TestUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,13 @@ public static void assertXMLEqual(Document exp, Document act) {
.build();
if (d.hasDifferences()) {
try {
TransformerFactory.newInstance().newTransformer().transform(new DOMSource(act), new StreamResult(System.out));
} catch (TransformerException e) {
throw new RuntimeException(e);
var transformerFactory = TransformerFactory.newInstance();
transformerFactory.newTransformer().transform(new DOMSource(exp), new StreamResult(System.out));
System.out.println();
transformerFactory.newTransformer().transform(new DOMSource(act), new StreamResult(System.out));
System.out.println();
} catch (TransformerException ex) {
//
}
throw new AssertionError(d.toString());
}
Expand Down
26 changes: 1 addition & 25 deletions src/test/java/org/dita/dost/module/AbstractModuleTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,6 @@
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMSource;
import javax.xml.transform.stream.StreamResult;
import org.dita.dost.TestUtils;
import org.dita.dost.TestUtils.CachingLogger;
import org.dita.dost.TestUtils.CachingLogger.Message;
Expand Down Expand Up @@ -230,27 +226,7 @@ private void compare(File actDir, File expDir, Store store) throws SAXException,
} else {
final Document expDoc = getDocument(exp);
final Document actDoc = store.getDocument(act.toURI());
// assertXMLEqual("Comparing " + exp + " to " + act + ":",
// expDoc, actDoc);
try {
assertXMLEqual(expDoc, actDoc);
} catch (AssertionError e) {
try {
System.out.println("\nEXP:\n");
TransformerFactory
.newInstance()
.newTransformer()
.transform(new DOMSource(expDoc), new StreamResult(System.out));
System.out.println("\nACT:\n");
TransformerFactory
.newInstance()
.newTransformer()
.transform(new DOMSource(actDoc), new StreamResult(System.out));
} catch (TransformerException ex) {
throw new RuntimeException(ex);
}
throw e;
}
assertXMLEqual(expDoc, actDoc);
}
}
if (new File(expDir, ".job.xml").exists()) {
Expand Down
6 changes: 0 additions & 6 deletions src/test/resources/mapref/basic/exp/preprocess/fallback.dita

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions src/test/resources/mapref/basic/exp/preprocess/submap.ditamap

This file was deleted.

6 changes: 0 additions & 6 deletions src/test/resources/mapref/basic/exp/preprocess/test.dita

This file was deleted.

51 changes: 0 additions & 51 deletions src/test/resources/mapref/basic/exp/preprocess/test.ditamap

This file was deleted.

This file was deleted.

This file was deleted.

6 changes: 0 additions & 6 deletions src/test/resources/mapref/basic/exp/preprocess2/test.dita

This file was deleted.

51 changes: 0 additions & 51 deletions src/test/resources/mapref/basic/exp/preprocess2/test.ditamap

This file was deleted.

8 changes: 0 additions & 8 deletions src/test/resources/mapref/basic/src/fallback.dita

This file was deleted.

6 changes: 0 additions & 6 deletions src/test/resources/mapref/basic/src/fallback.ditamap

This file was deleted.

6 changes: 0 additions & 6 deletions src/test/resources/mapref/basic/src/submap.ditamap

This file was deleted.

Loading

0 comments on commit 3531736

Please sign in to comment.