Permalink
Browse files

Added unit test for bug 2853035, which appears to be resolved now

  • Loading branch information...
1 parent 5ce730b commit 74f866127615cf3027402cb61449c44c8d6a35fb @rajarshi rajarshi committed Oct 19, 2010
Showing with 28 additions and 0 deletions.
  1. +28 −0 src/test/org/openscience/cdk/aromaticity/CDKHueckelAromaticityDetectorTest.java
View
28 src/test/org/openscience/cdk/aromaticity/CDKHueckelAromaticityDetectorTest.java
@@ -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.