Changeset 424890 for molecuilder/src


Ignore:
Timestamp:
Apr 26, 2010, 4:11:23 PM (15 years ago)
Author:
Frederik Heber <heber@…>
Children:
5a2599
Parents:
b1c92e
Message:

FIX: AnalysisCorrelationToPointUnitTest has been broken due to init of all bins in range to zero.

  • number of bins is thus 3, not 2, though there are only two non-zero values, in AnalysisCorrelationToPointUnitTest::CorrelationToPointBinNoRangeTest()
  • also shifted and corrected (new parameter ofstream) OutputCorrelation() in front of ASSERT to allow checking in case of failure.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/unittests/AnalysisCorrelationToPointUnitTest.cpp

    rb1c92e r424890  
    118118  // put pair correlation into bins and check with no range
    119119  binmap = BinData( pointmap, 0.5, 0., 0. );
    120   CPPUNIT_ASSERT_EQUAL( (size_t)2, binmap->size() );
    121   //OutputCorrelation ( binmap );
     120  OutputCorrelation ( (ofstream *)&cout, binmap );
     121  CPPUNIT_ASSERT_EQUAL( (size_t)3, binmap->size() );
    122122  tester = binmap->begin();
    123123  CPPUNIT_ASSERT_EQUAL( 1., tester->first );
     
    131131  // ... and check with [0., 2.] range
    132132  binmap = BinData( pointmap, 0.5, 0., 2. );
     133  OutputCorrelation ( (ofstream *)&cout, binmap );
    133134  CPPUNIT_ASSERT_EQUAL( (size_t)5, binmap->size() );
    134   //OutputCorrelation ( binmap );
    135135  tester = binmap->begin();
    136136  CPPUNIT_ASSERT_EQUAL( 0., tester->first );
Note: See TracChangeset for help on using the changeset viewer.