Kaydet (Commit) 28759cea authored tarafından shiming zhang's avatar shiming zhang Kaydeden (comit) I-Jui (Ray) Sung

GPU Calc: unit test cases for support optional parameter for VARA

AMLOEXT-402 BUG

Change-Id: If6f4064d3e706957cc1db0c668f42675642455c3
Signed-off-by: 's avatarhaochen <haochen@multicorewareinc.com>
Signed-off-by: 's avatarWei Wei <weiwei@multicorewareinc.com>
Signed-off-by: 's avatarI-Jui (Ray) Sung <ray@multicorewareinc.com>
üst 076a2d99
...@@ -289,6 +289,7 @@ public: ...@@ -289,6 +289,7 @@ public:
void testMathFormulaAverageIf_Mix(); void testMathFormulaAverageIf_Mix();
void testStatisticalFormulaKurt1(); void testStatisticalFormulaKurt1();
void testStatisticalFormulaHarMean1(); void testStatisticalFormulaHarMean1();
void testStatisticalFormulaVarA1();
CPPUNIT_TEST_SUITE(ScOpenclTest); CPPUNIT_TEST_SUITE(ScOpenclTest);
CPPUNIT_TEST(testSharedFormulaXLS); CPPUNIT_TEST(testSharedFormulaXLS);
CPPUNIT_TEST(testFinacialFormula); CPPUNIT_TEST(testFinacialFormula);
...@@ -509,6 +510,7 @@ public: ...@@ -509,6 +510,7 @@ public:
CPPUNIT_TEST(testMathFormulaAverageIf_Mix); CPPUNIT_TEST(testMathFormulaAverageIf_Mix);
CPPUNIT_TEST(testStatisticalFormulaKurt1); CPPUNIT_TEST(testStatisticalFormulaKurt1);
CPPUNIT_TEST(testStatisticalFormulaHarMean1); CPPUNIT_TEST(testStatisticalFormulaHarMean1);
CPPUNIT_TEST(testStatisticalFormulaVarA1);
CPPUNIT_TEST_SUITE_END(); CPPUNIT_TEST_SUITE_END();
private: private:
...@@ -6019,6 +6021,32 @@ void ScOpenclTest::testStatisticalFormulaHarMean1() ...@@ -6019,6 +6021,32 @@ void ScOpenclTest::testStatisticalFormulaHarMean1()
xDocSh->DoClose(); xDocSh->DoClose();
xDocShRes->DoClose(); xDocShRes->DoClose();
} }
//[AMLOEXT-402]
void ScOpenclTest::testStatisticalFormulaVarA1()
{
if (!detectOpenCLDevice())
return;
ScDocShellRef xDocSh = loadDoc("opencl/statistical/VarA1.", XLS);
ScDocument* pDoc = xDocSh->GetDocument();
CPPUNIT_ASSERT(pDoc);
enableOpenCL();
pDoc->CalcAll();
ScDocShellRef xDocShRes = loadDoc("opencl/statistical/VarA1.", XLS);
ScDocument* pDocRes = xDocShRes->GetDocument();
CPPUNIT_ASSERT(pDocRes);
// Check the results of formula cells in the shared formula range.
for (SCROW i = 1; i <= 20; ++i)
{
double fLibre = pDoc->GetValue(ScAddress(1,i,0));
double fExcel = pDocRes->GetValue(ScAddress(1,i,0));
CPPUNIT_ASSERT_DOUBLES_EQUAL(fExcel, fLibre, fabs(0.0001*fExcel));
}
xDocSh->DoClose();
xDocShRes->DoClose();
}
ScOpenclTest::ScOpenclTest() ScOpenclTest::ScOpenclTest()
: ScBootstrapFixture( "/sc/qa/unit/data" ) : ScBootstrapFixture( "/sc/qa/unit/data" )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment