Skip to content

Commit a95dc78

Browse files
committed
TST: verify rmin, rmax in OverlapCalculator
Not passing yet - expose rmin bug.
1 parent 6e74f72 commit a95dc78

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

src/tests/TestOverlapCalculator.hpp

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,31 @@ class TestOverlapCalculator : public CxxTest::TestSuite
5454
}
5555

5656

57+
void test_rmin()
58+
{
59+
molc->eval(mnacl);
60+
TS_ASSERT(molc->distances().size());
61+
double tot = molc->totalSquareOverlap();
62+
TS_ASSERT_LESS_THAN(0.0, tot);
63+
molc->setRmin(10);
64+
molc->eval();
65+
TS_ASSERT(molc->distances().empty());
66+
TS_ASSERT_EQUALS(0.0, molc->totalSquareOverlap());
67+
molc->setRmin(2);
68+
molc->eval();
69+
TS_ASSERT_EQUALS(tot, molc->totalSquareOverlap());
70+
}
71+
72+
73+
void test_rmax()
74+
{
75+
molc->setRmax(2.5);
76+
molc->eval(mnacl);
77+
TS_ASSERT(molc->distances().empty())
78+
TS_ASSERT_EQUALS(0.0, molc->totalSquareOverlap());
79+
}
80+
81+
5782
void test_lineNoTouch()
5883
{
5984
AtomicStructureAdapterPtr stru(new AtomicStructureAdapter);

0 commit comments

Comments
 (0)