Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test assert #397

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion model/Clinical/CMDecisionTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class CMDTUncomplicated : public CMDecisionTree {

if ( ((hostData.pgState & Episode::SICK) && !(hostData.pgState & Episode::COMPLICATED)) || (hostData.pgState & Episode::MALARIA) )
{
if (latest.time + memory >= sim::now())
if (latest.time + memory >= sim::nowOrTs0())
return positive.exec( hostData );
else
return negative.exec( hostData );
Expand Down
2 changes: 1 addition & 1 deletion model/Host/Human.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ Human::Human(SimTime dateOfBirth) :
{
// Initial humans are created at time 0 and may have dateOfBirth in past. Otherwise dateOfBirth must be now.
assert( dateOfBirth == sim::nowOrTs1() || (sim::now() == sim::zero() && dateOfBirth < sim::now()) );

HumanHet het = hetSample(rng);

withinHostModel = WithinHost::WHInterface::createWithinHostModel( rng, het.comorbidityFactor );
Expand Down
3 changes: 2 additions & 1 deletion unittest/CMDecisionTreeSuite.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ class CMDecisionTreeSuite : public CxxTest::TestSuite

UnittestUtil::EmpiricalWHM_setup();

human.reset( UnittestUtil::createHuman(sim::zero()).release() );
human.reset( UnittestUtil::createHuman(sim::nowOrTs0()).release() );

ETS_ASSERT( human.get() != 0 );
whm = dynamic_cast<WHMock*>(UnittestUtil::setHumanWH( *human,
unique_ptr<WithinHost::WHInterface>(new WHMock()) ));
Expand Down
Loading