Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit 74f866127615cf3027402cb61449c44c8d6a35fb 1 parent 5ce730b
Rajarshi Guha rajarshi authored
28 src/test/org/openscience/cdk/aromaticity/CDKHueckelAromaticityDetectorTest.java
View
@@ -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));
+ }
+ }
+ }
+
}
Please sign in to comment.
Something went wrong with that request. Please try again.