diff --git a/Code/GraphMol/SmilesParse/test.cpp b/Code/GraphMol/SmilesParse/test.cpp index dd507d898..8e6dc6273 100644 --- a/Code/GraphMol/SmilesParse/test.cpp +++ b/Code/GraphMol/SmilesParse/test.cpp @@ -3404,7 +3404,27 @@ void testGithub298(){ TEST_ASSERT(m); TEST_ASSERT(m->getNumAtoms()==80); TEST_ASSERT(m->getNumBonds()==210); - + delete m; + } + BOOST_LOG(rdInfoLog) << "done" << std::endl; +} + +void testGithub378(){ + BOOST_LOG(rdInfoLog) << "-------------------------------------" << std::endl; + BOOST_LOG(rdInfoLog) << "Testing Github 378: SMILES parser doing the wrong thing for odd dot-disconnected construct" << std::endl; + { + RWMol *m; + std::string smiles="C1.C1CO1.N1"; + m = SmilesToMol(smiles); + TEST_ASSERT(m); + TEST_ASSERT(m->getBondBetweenAtoms(0,1)); + TEST_ASSERT(m->getBondBetweenAtoms(0,1)->getBondType()==Bond::SINGLE); + delete m; + TEST_ASSERT(m->getBondBetweenAtoms(3,4)); + TEST_ASSERT(m->getBondBetweenAtoms(3,4)->getBondType()==Bond::SINGLE); + TEST_ASSERT(!m->getBondBetweenAtoms(1,3)); + + } BOOST_LOG(rdInfoLog) << "done" << std::endl; } @@ -3465,5 +3485,6 @@ main(int argc, char *argv[]) testGithub210(); #endif testGithub298(); + testGithub378(); //testBug1719046(); }