Skip to content

Commit

Permalink
Added testing of the number of double bonds found (fixes #3514176)
Browse files Browse the repository at this point in the history
Change-Id: I1d2740ce310a767c9fa236be5b602ac64ee9b5d9
Signed-off-by: ngn <jeliazkova.nina@gmail.com>

Conflicts:

	src/test/org/openscience/cdk/smiles/DeduceBondSystemToolTest.java
  • Loading branch information
egonw committed Apr 14, 2012
1 parent faa5404 commit 8de0072
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -77,10 +77,13 @@ public void testPyrrole() throws Exception {
Assert.assertNotNull(molecule);

molecule = (IAtomContainer) AtomContainerManipulator.removeHydrogens(molecule);
int doubleBondCount = 0;
for (int i = 0; i < molecule.getBondCount(); i++) {
IBond bond = molecule.getBond(i);
Assert.assertTrue(bond.getFlag(CDKConstants.ISAROMATIC));
if (bond.getOrder() == Order.DOUBLE) doubleBondCount++;
}
Assert.assertEquals(6, doubleBondCount);
}

@Test
Expand Down Expand Up @@ -143,10 +146,13 @@ public void testPyrrole_CustomRingFinder() throws Exception {
Assert.assertNotNull(molecule);

molecule = (IAtomContainer) AtomContainerManipulator.removeHydrogens(molecule);
int doubleBondCount = 0;
for (int i = 0; i < molecule.getBondCount(); i++) {
IBond bond = molecule.getBond(i);
Assert.assertTrue(bond.getFlag(CDKConstants.ISAROMATIC));
if (bond.getOrder() == Order.DOUBLE) doubleBondCount++;
}
Assert.assertEquals(6, doubleBondCount);
}

/**
Expand Down

0 comments on commit 8de0072

Please sign in to comment.