// Without the fix in place, this test would have crashed
sheet::GoalResult res = pModelObj->seekGoal(aFormulaCell, aVariableCell, u"100"_ustr);
CPPUNIT_ASSERT_EQUAL(0.0, res.Result);
CPPUNIT_ASSERT_EQUAL(DBL_MAX, res.Divergence);
}
// Without the fix in place, this test would have hung here
sheet::GoalResult res = pModelObj->seekGoal(aFormulaCell, aVariableCell, "0");
CPPUNIT_ASSERT_DOUBLES_EQUAL(11778.08775, res.Result, 0.0001);
CPPUNIT_ASSERT_EQUAL(DBL_MAX, res.Divergence);
}
sheet::GoalResult res = pModelObj->seekGoal(aFormulaCell, aVariableCell, u"2"_ustr); // Without the fix in place, this test would have failed with // - Expected: 4 // - Actual : 0
CPPUNIT_ASSERT_EQUAL(4.0, res.Result);
CPPUNIT_ASSERT_EQUAL(0.0, res.Divergence);
}
// Without the fix in place, this test would have failed with // - Expected: 0.3125 // - Actual : #N/A
CPPUNIT_ASSERT_EQUAL(u"0.3125"_ustr, pDoc->GetString(ScAddress(3, 0, 0)));
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.