Skip to content

Commit

Permalink
Minor test cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
johnmay committed Oct 25, 2018
1 parent da7439a commit 3ce35ed
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -347,8 +347,9 @@ public void upgradeHydrogen() throws Exception {
}

@Test
public void erm() throws Exception {
assertMismatch(smi("CC[C@@H](C)O"), smi("CC[C@](C)(N)O"));
public void shouldMatchAsSmilesButNotSmarts() throws Exception {
// H > 0
assertMismatch(sma("CC[C@@H](C)O"), smi("CC[C@](C)(N)O"));
}

// doesn't matter if the match takes place but it should not cause and error
Expand Down Expand Up @@ -396,10 +397,11 @@ IAtomContainer smi(String smi) throws Exception {
// Note: only use simple constructs! the target properties will not
// currently be initialised. avoid aromaticity, rings etc.
IAtomContainer sma(String sma) throws Exception {
IAtomContainer query = new QueryAtomContainer(null);
IAtomContainer query = new QueryAtomContainer(SilentChemObjectBuilder.getInstance());
if (!Smarts.parse(query, sma)) {
throw new IOException(Smarts.getLastErrorMesg());
}
query.setTitle(sma);
return query;
}
}

0 comments on commit 3ce35ed

Please sign in to comment.