Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Added testing of the number of double bonds found (fixes #3514176)
Change-Id: I1d2740ce310a767c9fa236be5b602ac64ee9b5d9
Signed-off-by: ngn <jeliazkova.nina@gmail.com>
  • Loading branch information
egonw committed Apr 3, 2012
1 parent 059da00 commit a6597e3
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -76,10 +76,13 @@ public void testPyrrole() throws Exception {
Assert.assertNotNull(molecule);

molecule = (IMolecule) 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 @@ -142,10 +145,13 @@ public void testPyrrole_CustomRingFinder() throws Exception {
Assert.assertNotNull(molecule);

molecule = (IMolecule) 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 a6597e3

Please sign in to comment.