CPPUNIT_ASSERT_MESSAGE("Failed to parse.",(nRes&SCA_VALID)!=0);
nRes=aEnd.Parse("baz.$A9",m_pDoc);
CPPUNIT_ASSERT_MESSAGE("Failed to parse.",(nRes&SCA_VALID)!=0);
for(SCROWi=aStart.Row();i<aEnd.Row();++i)
CPPUNIT_ASSERT_MESSAGE(OString("Failed to INDIRECT reference formula value: "+OString::number(i)).getStr(),m_pDoc->GetValue(ScAddress(aStart.Col(),i,aStart.Tab()))!=10.0);
// Check formula cell error
nRes=aStart.Parse("baz.$A10",m_pDoc);
CPPUNIT_ASSERT_MESSAGE("Failed to parse.",(nRes&SCA_VALID)!=0);
ScFormulaCell*pFC=m_pDoc->GetFormulaCell(aStart);
CPPUNIT_ASSERT_MESSAGE("This should be a formula cell.",pFC);
CPPUNIT_ASSERT_MESSAGE("This formula cell should be an error.",pFC->GetErrCode()!=0);
m_pDoc->DeleteTab(2);
m_pDoc->DeleteTab(1);
m_pDoc->DeleteTab(0);
}
voidTest::testFormulaDepTracking()
{
CPPUNIT_ASSERT_MESSAGE("failed to insert sheet",m_pDoc->InsertTab(0,"foo"));