mirror of
https://github.com/rdkit/rdkit.git
synced 2026-06-06 22:39:55 +08:00
add test for #378
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user