Skip to content

Commit

Permalink
Added a unit test for C.sp2 perception with SINGLE_OR_DOUBLE bonds
Browse files Browse the repository at this point in the history
Change-Id: Ic1de95e700e6d52adc3b89f97dc2caf78d07ddac
Signed-off-by: John May <john.wilkinsonmay@gmail.com>
  • Loading branch information
egonw committed Nov 9, 2012
1 parent 6f26188 commit 8956530
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/test/org/openscience/cdk/atomtype/CDKAtomTypeMatcherTest.java
Expand Up @@ -2092,6 +2092,27 @@ public void fix_Ca_1() throws Exception {
assertAtomTypes(testedAtomTypes, expectedTypes, molecule);
}

@Test public void testBenzene_SingleOrDouble() throws Exception {
String[] expectedTypes = {
"C.sp2",
"C.sp2",
"C.sp2",
"C.sp2",
"C.sp2",
"C.sp2"
};
IAtomContainer molecule = new AtomContainer();
molecule.add(new Ring(6, "C"));
for (IBond bond : molecule.bonds()) {
bond.setOrder(IBond.Order.UNSET);
bond.setFlag(CDKConstants.SINGLE_OR_DOUBLE, true);
}
for (IAtom atom : molecule.atoms()) {
atom.setImplicitHydrogenCount(1);
}
assertAtomTypes(testedAtomTypes, expectedTypes, molecule);
}

@Test public void testPyrrole() throws Exception {
String[] expectedTypes = {
"C.sp2",
Expand Down

0 comments on commit 8956530

Please sign in to comment.