Skip to content

Commit

Permalink
Added tests for two cases of aromatic rings
Browse files Browse the repository at this point in the history
Signed-off-by: Rajarshi  Guha <rajarshi.guha@gmail.com>
  • Loading branch information
Stefan Kuhn authored and rajarshi committed Mar 27, 2010
1 parent 3b08f1a commit c26ae95
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions src/test/org/openscience/cdk/smiles/SmilesParserTest.java
Expand Up @@ -1816,5 +1816,27 @@ public void testBadRingClosure2() throws InvalidSmilesException {
SmilesParser p = new SmilesParser(DefaultChemObjectBuilder.getInstance());
p.parseSmiles("NC1=CC=C(N)C=C");
}

@Test
public void testPyrolle() throws InvalidSmilesException{
SmilesParser p = new SmilesParser(DefaultChemObjectBuilder.getInstance());
IMolecule mol = p.parseSmiles("c1c[nH]cc1");
for(int i=0;i<5;i++){
Assert.assertTrue(mol.getAtom(i).getFlag(CDKConstants.ISAROMATIC));
}
}

/**
* @cdk.bug 2976054
* @throws InvalidSmilesException
*/
@Test
public void testAromaticity() throws InvalidSmilesException{
SmilesParser p = new SmilesParser(DefaultChemObjectBuilder.getInstance());
IMolecule mol = p.parseSmiles("O=Cc1c(OC)nc2s[cH][cH]n12");
for(int i=0;i<5;i++){
Assert.assertTrue(mol.getAtom(i).getFlag(CDKConstants.ISAROMATIC));
}
}
}

0 comments on commit c26ae95

Please sign in to comment.