Skip to content

Commit

Permalink
Merge pull request #1164 from sys-bio/fix-disabled-tests
Browse files Browse the repository at this point in the history
Fix disabled tests
  • Loading branch information
luciansmith committed Nov 11, 2023
2 parents 4734eb5 + cb2c6bc commit 4746b7e
Show file tree
Hide file tree
Showing 7 changed files with 255 additions and 233 deletions.
12 changes: 10 additions & 2 deletions source/rrRoadRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6108,8 +6108,10 @@ namespace rr {
}
}
for (std::string sid: toCheck) {
if (!isParameterUsed(sid)) {
removeParameter(sid, false);
if (impl->document->getModel()->getParameter(sid) != NULL) {
if (!isParameterUsed(sid)) {
removeParameter(sid, false);
}
}
}
}
Expand Down Expand Up @@ -6158,13 +6160,19 @@ namespace rr {
// Check if this parameter occurs in an assignment rule or rate rule
for (uint i = 0; i < sbmlModel->getNumRules(); i++) {
Rule *rule = sbmlModel->getRule(i);
if (rule->getId() == sid) {
return true;
}
if (hasVariable(rule->getMath(), sid)) {
return true;
}
}
// Check if this parameter occurs in an initial assigment
for (uint i = 0; i < sbmlModel->getNumInitialAssignments(); i++) {
InitialAssignment *initialAssignment = sbmlModel->getInitialAssignment(i);
if (initialAssignment->getId() == sid) {
return true;
}
if (hasVariable(initialAssignment->getMath(), sid)) {
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions test/TestModelFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ void SteadyStateResult::checkSteadyState(rr::RoadRunner *rr, double tol) {
double actualResult = result[0][i]; // 0th row, ith col of a DoubleMatrix
double expected = expectedResult[speciesID]; // first is start val, second is speciesID at steady state

std::cout << "Comparing \"" << speciesID << "\" expected result: " << expected
<< " with actual result " << actualResult << std::endl;
//std::cout << "Comparing \"" << speciesID << "\" expected result: " << expected
// << " with actual result " << actualResult << std::endl;
EXPECT_NEAR(expected, actualResult, tol);
}
}
Expand Down

0 comments on commit 4746b7e

Please sign in to comment.