Permalink
Browse files

Updated the signatures library to version 1.1 with one new method and…

… corresponding test case

Change-Id: I2ab9d2783d1f5e6a6d680a2b532142bd4248b07a
Signed-off-by: John May <john.wilkinsonmay@gmail.com>
Signed-off-by: Egon Willighagen <egonw@users.sourceforge.net>
  • Loading branch information...
gilleain authored and egonw committed Apr 16, 2013
1 parent 457aab7 commit 8fa55bc0543f4864b0931e48335242baff778408
View
@@ -22,7 +22,7 @@
<classpathentry kind="lib" path="develjar/antlr.jar"/>
<classpathentry kind="lib" path="jar/commons-math3-3.0.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry exported="true" kind="lib" path="jar/signatures-1.0.jar"/>
<classpathentry kind="lib" path="jar/signatures-1.1.jar"/>
<classpathentry kind="lib" path="jar/jena/jena.jar"/>
<classpathentry kind="lib" path="jar/jena/slf4j-simple-1.5.0.jar"/>
<classpathentry kind="lib" path="jar/jena/commons-logging-1.1.1.jar"/>
View
Binary file not shown.
View
Binary file not shown.
@@ -1,6 +1,6 @@
[template.jar]
Library=Signatures
Version=1.0
Version=1.1
Copyright=Lars Carlsson and Gilleain Torrance
License=MIT licence
LicenseURL=http://github.com/gilleain/signatures/blob/master/LICENCE.txt
@@ -1 +1 @@
signatures-1.0.jar
signatures-1.1.jar
@@ -1,3 +1,3 @@
vecmath*.jar
commons-cli-1.0.jar
signatures-1.0.jar
signatures-1.1.jar
@@ -2,4 +2,4 @@ vecmath*.jar
jgrapht-0.6.0.jar
log4j*.jar
commons-math*.jar
signatures-1.0.jar
signatures-1.1.jar
@@ -1,3 +1,3 @@
vecmath*.jar
jgrapht-0.6.0.jar
signatures-1.0.jar
signatures-1.1.jar
@@ -2,4 +2,4 @@ vecmath*.jar
commons-cli-1.0.jar
log4j.jar
jgrapht-0.6.0.jar
signatures-1.0.jar
signatures-1.1.jar
@@ -211,4 +211,21 @@ protected String getVertexSymbol(int vertexIndex) {
return this.molecule.getAtom(vertexIndex).getSymbol();
}
@Override /** {@inheritDoc} */
@TestMethod("convertEdgeLabelToColorTest")
protected int convertEdgeLabelToColor(String edgeLabel) {
if (edgeLabel.equals("")) {
return 1;
} else if (edgeLabel.equals("=")) {
return 2;
} else if (edgeLabel.equals("#")) {
return 3;
} else if (edgeLabel.equals("$")) {
return 4;
} else if (edgeLabel.equals("p")) {
return 5;
}
return 0;
}
}
@@ -184,4 +184,18 @@ public void allEqualAtHeightTest(IAtomContainer molecule, int height) {
}
Assert.assertEquals(1, sigfreq.keySet().size());
}
@Test
public void convertEdgeLabelToColorTest() {
IAtomContainer ac = makeBenzene(); // doesn't really matter
AtomSignature atomSignature = new AtomSignature(0, ac);
int aromaticColor = atomSignature.convertEdgeLabelToColor("p");
Assert.assertTrue(aromaticColor > 0);
int singleColor = atomSignature.convertEdgeLabelToColor("");
int doubleColor = atomSignature.convertEdgeLabelToColor("=");
int tripleColor = atomSignature.convertEdgeLabelToColor("#");
Assert.assertTrue(singleColor < doubleColor);
Assert.assertTrue(doubleColor < tripleColor);
}
}
@@ -103,5 +103,12 @@ public void testC7H16Isomers() {
checkParameters(qGraphB, 4, 5, 0);
checkParameters(qGraphC, 4, 7, 1);
}
@Test
public void testAromatic() {
IAtomContainer benzene = AbstractSignatureTest.makeBenzene();
SignatureQuotientGraph qGraph = new SignatureQuotientGraph(benzene);
checkParameters(qGraph, 1, 1, 1);
}
}

0 comments on commit 8fa55bc

Please sign in to comment.