Skip to content

Commit 96566b9

Browse files
johnmayegonw
authored andcommitted
Eliminate testdata from cdk-sdg moving all resources to the module (and package) where they are used.
1 parent 7f91aa7 commit 96566b9

File tree

9 files changed

+14
-21
lines changed

9 files changed

+14
-21
lines changed

tool/sdg/pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,6 @@
8686
<type>test-jar</type>
8787
<scope>test</scope>
8888
</dependency>
89-
<dependency>
90-
<groupId>${project.groupId}</groupId>
91-
<artifactId>cdk-testdata</artifactId>
92-
<version>${project.parent.version}</version>
93-
<type>test-jar</type>
94-
<scope>test</scope>
95-
</dependency>
9689
</dependencies>
9790

9891
</project>

tool/sdg/src/test/java/org/openscience/cdk/layout/OverlapResolverTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ public class OverlapResolverTest extends CDKTestCase {
6161
@Test
6262
public void testResolveOverlap1() throws Exception {
6363
logger.debug("Test case with atom clash");
64-
String filename = "data/cml/overlaptest.cml";
65-
InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
64+
String filename = "overlaptest.cml";
65+
InputStream ins = this.getClass().getResourceAsStream(filename);
6666
CMLReader reader = new CMLReader(ins);
6767
IChemFile chemFile = (IChemFile) reader.read(new ChemFile());
6868
IAtomContainer atomContainer = (IAtomContainer) ChemFileManipulator.getAllAtomContainers(chemFile).get(0);
@@ -88,8 +88,8 @@ public void testResolveOverlap1() throws Exception {
8888
@Test
8989
public void testResolveOverlap2() throws Exception {
9090
logger.debug("Test case with neither bond nor atom overlap");
91-
String filename = "data/cml/overlaptest2.cml";
92-
InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
91+
String filename = "overlaptest2.cml";
92+
InputStream ins = this.getClass().getResourceAsStream(filename);
9393
CMLReader reader = new CMLReader(ins);
9494
IChemFile chemFile = (IChemFile) reader.read(new ChemFile());
9595
IAtomContainer atomContainer = (IAtomContainer) ChemFileManipulator.getAllAtomContainers(chemFile).get(0);
@@ -108,8 +108,8 @@ public void testResolveOverlap2() throws Exception {
108108
@Test
109109
public void testResolveOverlap3() throws Exception {
110110
logger.debug("Test case with bond overlap");
111-
String filename = "data/cml/overlaptest3.cml";
112-
InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
111+
String filename = "overlaptest3.cml";
112+
InputStream ins = this.getClass().getResourceAsStream(filename);
113113
CMLReader reader = new CMLReader(ins);
114114
IChemFile chemFile = (IChemFile) reader.read(new ChemFile());
115115
IAtomContainer atomContainer = (IAtomContainer) ChemFileManipulator.getAllAtomContainers(chemFile).get(0);
@@ -129,8 +129,8 @@ public void testResolveOverlap3() throws Exception {
129129
public void testResolveOverlap4() throws Exception {
130130
double overlapScore = 0;
131131
logger.debug("Test case with atom clash");
132-
String filename = "data/cml/overlaptest.cml";
133-
InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
132+
String filename = "overlaptest.cml";
133+
InputStream ins = this.getClass().getResourceAsStream(filename);
134134
CMLReader reader = new CMLReader(ins);
135135
IChemFile chemFile = (IChemFile) reader.read(new ChemFile());
136136
IAtomContainer atomContainer = (IAtomContainer) ChemFileManipulator.getAllAtomContainers(chemFile).get(0);

tool/sdg/src/test/java/org/openscience/cdk/layout/StructureDiagramGeneratorTest.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,10 @@ public void testBug1598409() throws Exception {
316316
*/
317317
@Test(timeout = 5000)
318318
public void testBug1572062() throws Exception {
319-
String filename = "data/mdl/sdg_test.mol";
319+
String filename = "sdg_test.mol";
320320

321321
// set up molecule reader
322-
InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
322+
InputStream ins = this.getClass().getResourceAsStream(filename);
323323
ISimpleChemObjectReader molReader = new MDLV2000Reader(ins, Mode.STRICT);
324324

325325
// read molecule
@@ -669,8 +669,8 @@ public IAtomContainer makeBug1750968() throws Exception {
669669
@Test(timeout = 5000)
670670
public void testNPEWithBridgedRingsBug1772609() throws Exception {
671671
// set up molecule reader
672-
String filename = "data/mdl/bug1772609.mol";
673-
InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
672+
String filename = "bug1772609.mol";
673+
InputStream ins = this.getClass().getResourceAsStream(filename);
674674
ISimpleChemObjectReader molReader = new MDLV2000Reader(ins, Mode.STRICT);
675675

676676
// read molecule
@@ -700,8 +700,8 @@ public void testNPEWithBridgedRingsBug1772609() throws Exception {
700700
@Test(timeout = 5000)
701701
public void testBug1784850InfiniteLoop() throws Exception {
702702
// set up molecule reader
703-
String filename = "data/mdl/bug1784850.mol";
704-
InputStream ins = this.getClass().getClassLoader().getResourceAsStream(filename);
703+
String filename = "bug1784850.mol";
704+
InputStream ins = this.getClass().getResourceAsStream(filename);
705705
ISimpleChemObjectReader molReader = new MDLV2000Reader(ins, Mode.STRICT);
706706

707707
// read molecule

0 commit comments

Comments
 (0)