From: Egon W. <ego...@gm...> - 2008-12-20 20:03:52
|
Hi all (and the authors or Polymer, BioPolymer and PDBPolymer in particular), You may have noticed a steep increase in failing unit tests in the cdk1.2.x/ branch, as of commit r13676... That patch had this message: ---------------------------------------------------------------------------- Previously, unit tests in IAtomTypeTest would use code like: IAtomType type = getBuilder().newAtomType() // then, test e.g. getAtomTypeName() This would test NNAtomType in the nonotify module, but it would only test the getAtomTypeName() method of NNAtomType. Now, it is constructed with: IAtomType type = (IAtomType)newChemObject(); which will actually return a NNAtomType, *or* subclass... and that's important, as that extending IAtomTypeTest will now also test getAtomTypeName() of NNAtom, NNPseudoAtom, etc, which was not tested before. ---------------------------------------------------------------------------- In short, it means that tests methods for AtomContainer will also be applied to all subclasses of AtomContainer. It assumes the inherited methods behave identically, unless the AtomContainerSubClassTest overwrites the method in the (I)AtomContainerTest... Now, what seems to fail is methods in the Polymer subclass hierarchy, which inherits from AtomContainer... however, cloning, apparently, works differently... causing a lot of cloning tests to fail... At the time of writing, I have no clue if this is a grave bug in the data classes, or in the new unit testing system... and I will explore so asap. But any help, comments, ideas or just questions is useful now.... A likely nasty side effect is, that we can forget about CDK 1.2.0 to be released this year... :( Egon -- ---- http://chem-bla-ics.blogspot.com/ |