Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fixed the tests to have the right match counts (patch by Dazhi Jiao)
Change-Id: Ib8e6b9f11aeee2623abe76a6ad616a8250b3af44

Signed-off-by: Rajarshi Guha <rajarshi.guha@gmail.com>
  • Loading branch information
egonw authored and rajarshi committed Apr 12, 2012
1 parent 92604d8 commit 0aa84d7
Showing 1 changed file with 7 additions and 4 deletions.
Expand Up @@ -22,12 +22,15 @@

import org.junit.Assert;
import org.junit.Test;
import org.openscience.cdk.CDKConstants;
import org.openscience.cdk.CDKTestCase;
import org.openscience.cdk.ChemFile;
import org.openscience.cdk.ChemObject;
import org.openscience.cdk.DefaultChemObjectBuilder;
import org.openscience.cdk.exception.CDKException;
import org.openscience.cdk.interfaces.IAtom;
import org.openscience.cdk.interfaces.IAtomContainer;
import org.openscience.cdk.interfaces.IRingSet;
import org.openscience.cdk.io.DefaultChemObjectReader;
import org.openscience.cdk.io.MDLV2000Reader;
import org.openscience.cdk.isomorphism.UniversalIsomorphismTester;
Expand Down Expand Up @@ -626,7 +629,7 @@ public void testPropertyD11() throws Exception {
int[] results;

results = match("[OD1H]-*", "CCO");
Assert.assertEquals(2, results[0]);
Assert.assertEquals(1, results[0]);
Assert.assertEquals(1, results[1]);
}

Expand All @@ -639,7 +642,7 @@ public void testPropertyD12() throws Exception {
int[] results;

results = match("[OD1H]-*", "CCO[H]");
Assert.assertEquals(2, results[0]);
Assert.assertEquals(1, results[0]);
Assert.assertEquals(1, results[1]);

}
Expand Down Expand Up @@ -1452,7 +1455,7 @@ public void testPropertyAtomicMass7() throws Exception {


results = match("C#[#X]", "CCNC(=O)C#N");
Assert.assertEquals(2, results[0]);
Assert.assertEquals(1, results[0]);
Assert.assertEquals(1, results[1]);

results = match("C#[#X]", "CCNC(=O)C#C");
Expand Down Expand Up @@ -1598,7 +1601,7 @@ public void testLactamRecursive() throws Exception {
@Test
public void testLactamRecursiveAlternate() throws Exception {
int[] results = match("[!R]-[$([NRD3][CR]=O)]", "N1(CC)C(=O)CCCC1");
Assert.assertEquals(2, results[0]);
Assert.assertEquals(1, results[0]);
Assert.assertEquals(1, results[1]);
}

Expand Down

0 comments on commit 0aa84d7

Please sign in to comment.