Skip to content

Commit

Permalink
Correction of the test results. Two identical isotopes but initiated …
Browse files Browse the repository at this point in the history
…twice are not the same object isotope even they are the same chemitry isotope.

git-svn-id: https://cdk.svn.sourceforge.net/svnroot/cdk/cdk/branches/cdk-1.2.x@13220 eb4e18e3-b210-0410-a6ab-dec725e4b171
  • Loading branch information
miguelrojasch committed Nov 22, 2008
1 parent 5738882 commit 9cd2a65
Showing 1 changed file with 13 additions and 0 deletions.
Expand Up @@ -494,6 +494,19 @@ public void testGetTotalNaturalAbundance_IMolecularFormula3() throws Exception{
formula2.addIsotope(br1);
formula2.addIsotope(br2);

Assert.assertEquals(2,formula2.getIsotopeCount());
double totalAbudance = MolecularFormulaManipulator.getTotalNaturalAbundance(formula2);

Assert.assertEquals(0.25694761,totalAbudance,0.000001);
}
@Test
public void testGetTotalNaturalAbundance_IMolecularFormula4() throws Exception{
IMolecularFormula formula2 = new MolecularFormula();
IIsotope br1 = builder.newIsotope("Br");
br1.setNaturalAbundance(50.69);
formula2.addIsotope(br1);
formula2.addIsotope(br1);

Assert.assertEquals(1,formula2.getIsotopeCount());
double totalAbudance = MolecularFormulaManipulator.getTotalNaturalAbundance(formula2);

Expand Down

0 comments on commit 9cd2a65

Please sign in to comment.