Skip to content

Commit dd4ab31

Browse files
committed
Query reading is now more consistent, previously we would end up with a mixed bag of some "real" and some "query" bonds. We now get out all query bonds which broke the test. The correct test is that there are 6 query bonds of type SINGLE/DOUBLE, the other query bonds match order=1.
1 parent 3c99ef7 commit dd4ab31

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

storage/ctab/src/test/java/org/openscience/cdk/io/MDLV2000ReaderTest.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
/*
22
* Copyright (C) 2003-2007 The Chemistry Development Kit (CDK) project
33
* 2014 Mark B Vine (orcid:0000-0002-7794-0426)
44
*
@@ -977,8 +977,9 @@ public void testQueryBondType8() throws Exception {
977977
if (atom.getSymbol().equals("Ir")) {
978978
for (IBond bond : atc.getConnectedBondsList(atom)) {
979979
if (bond instanceof QueryBond) {
980+
if (((QueryBond) bond).getExpression().type() == Expr.Type.TRUE) {
980981
queryBondCount++;
981-
assertSame(((QueryBond) bond).getExpression().type(), Expr.Type.TRUE);
982+
}
982983
}
983984
}
984985
}
@@ -1000,8 +1001,9 @@ public void testQueryBondType6() throws Exception {
10001001

10011002
for (IBond bond : atc.bonds()) {
10021003
if (bond instanceof QueryBond) {
1003-
queryBondCount++;
1004-
assertSame(((QueryBond) bond).getExpression().type(), Expr.Type.SINGLE_OR_AROMATIC);
1004+
if (((QueryBond) bond).getExpression().type() == Expr.Type.SINGLE_OR_AROMATIC) {
1005+
queryBondCount++;
1006+
}
10051007
}
10061008
}
10071009
Assert.assertEquals("Expecting six 'query' bond types", 6, queryBondCount);
@@ -1762,7 +1764,7 @@ public void testMassDiff() throws Exception {
17621764
Assert.assertEquals(2, atom.getMassNumber().intValue());
17631765
}
17641766
}
1765-
1767+
17661768
@Test
17671769
public void testBadAtomCoordinateFormat() throws Exception {
17681770

0 commit comments

Comments
 (0)