Skip to content

Commit

Permalink
update unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
shajoezhu committed May 8, 2016
1 parent 125e25f commit cfffff0
Showing 1 changed file with 34 additions and 34 deletions.
68 changes: 34 additions & 34 deletions tests/unittest/test_updatePairHap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,40 +249,40 @@ class TestUpdatePairHap : public CppUnit::TestCase {
}
}

CPPUNIT_ASSERT_DOUBLES_EQUAL (1.0, double(counter[0][0])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[0][1])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[0][2])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[0][3])/(double)nRepeat, epsilon2);

CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[1][0])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[1][1])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[1][2])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (1.0, double(counter[1][3])/(double)nRepeat, epsilon2);

CPPUNIT_ASSERT_DOUBLES_EQUAL (0.621, double(counter[2][0])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.296, double(counter[2][1])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.083, double(counter[2][2])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[2][3])/(double)nRepeat, epsilon2);

CPPUNIT_ASSERT_DOUBLES_EQUAL (0.558, double(counter[3][0])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.319, double(counter[3][1])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.123, double(counter[3][2])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[3][3])/(double)nRepeat, epsilon2);

CPPUNIT_ASSERT_DOUBLES_EQUAL (1.0, double(counter[4][0])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[4][1])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[4][2])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[4][3])/(double)nRepeat, epsilon2);

CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[5][0])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.002, double(counter[5][1])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.018, double(counter[5][2])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.98, double(counter[5][3])/(double)nRepeat, epsilon2);

CPPUNIT_ASSERT_DOUBLES_EQUAL (0.412, double(counter[6][0])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.415, double(counter[6][1])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.171, double(counter[6][2])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.001, double(counter[6][3])/(double)nRepeat, epsilon2);
CPPUNIT_ASSERT_DOUBLES_EQUAL (1.0, double(counter[0][0])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[0][1])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[0][2])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[0][3])/(double)nRepeat, epsilon1);

CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[1][0])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[1][1])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[1][2])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (1.0, double(counter[1][3])/(double)nRepeat, epsilon1);

CPPUNIT_ASSERT_DOUBLES_EQUAL (0.621, double(counter[2][0])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.296, double(counter[2][1])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.083, double(counter[2][2])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[2][3])/(double)nRepeat, epsilon1);

CPPUNIT_ASSERT_DOUBLES_EQUAL (0.558, double(counter[3][0])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.319, double(counter[3][1])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.123, double(counter[3][2])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[3][3])/(double)nRepeat, epsilon1);

CPPUNIT_ASSERT_DOUBLES_EQUAL (1.0, double(counter[4][0])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[4][1])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[4][2])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[4][3])/(double)nRepeat, epsilon1);

CPPUNIT_ASSERT_DOUBLES_EQUAL (0.0, double(counter[5][0])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.002, double(counter[5][1])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.018, double(counter[5][2])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.98, double(counter[5][3])/(double)nRepeat, epsilon1);

CPPUNIT_ASSERT_DOUBLES_EQUAL (0.412, double(counter[6][0])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.415, double(counter[6][1])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.171, double(counter[6][2])/(double)nRepeat, epsilon1);
CPPUNIT_ASSERT_DOUBLES_EQUAL (0.001, double(counter[6][3])/(double)nRepeat, epsilon1);


this->plaf_ = vector < double > (this->updatePairHapPanel1_->nLoci_, 0.0);
Expand Down

0 comments on commit cfffff0

Please sign in to comment.