Skip to content

Commit

Permalink
Added unit test for bug 2853035, which appears to be resolved now
Browse files Browse the repository at this point in the history
  • Loading branch information
rajarshi committed Oct 19, 2010
1 parent 5ce730b commit 74f8661
Showing 1 changed file with 28 additions and 0 deletions.
Expand Up @@ -907,5 +907,33 @@ public void test3001616() throws Exception {
}
}

/**
* @cdk.bug 2853035
*/
@Test
public void testBug2853035() throws Exception {
SmilesParser sp = new SmilesParser(DefaultChemObjectBuilder.getInstance());
IMolecule mol = sp.parseSmiles("C(=O)c1cnn2ccccc12");
AtomContainerManipulator.percieveAtomTypesAndConfigureAtoms(mol);
Assert.assertTrue(CDKHueckelAromaticityDetector.detectAromaticity(mol));
for (IAtom atom : mol.atoms()) {
if (atom.getSymbol().equals("N")) {
Assert.assertTrue(atom.getFlag(CDKConstants.ISAROMATIC));
List<IBond> conbonds = mol.getConnectedBondsList(atom);
for (IBond bond : conbonds) {
if (bond.getOrder().equals(IBond.Order.SINGLE)) continue;
Assert.assertTrue(bond.getFlag(CDKConstants.ISAROMATIC));
}
}
}
SpanningTree st = new SpanningTree(mol);
IRingSet ringSet = st.getAllRings();
for (IAtomContainer ring : ringSet.atomContainers()) {
for (IBond bond : ring.bonds()) {
Assert.assertTrue(bond.getFlag(CDKConstants.ISAROMATIC));
}
}
}

}

0 comments on commit 74f8661

Please sign in to comment.