Review Request: Updating the test case for numfile in TestInformationFunctions
Marijn Kruisselbrink
mkruisselbrink at kde.org
Tue Nov 27 17:23:48 GMT 2012
> On Nov. 26, 2012, 6:51 p.m., Thorsten Zachmann wrote:
> > sheets/functions/information.cpp, lines 193-201
> > <http://git.reviewboard.kde.org/r/107459/diff/2/?file=96151#file96151line193>
> >
> > This seems to be wrong. It should return the number of of documents in the vlaue and not true and false.
>
> Boudewijn Rempt wrote:
> well, no -- I checked in 2.4, and back then it already returning a bool:
>
> if (type == "numfile")
> return Value(KoDocument::documentList() ? KoDocument::documentList()->count() : 0);
How is that returning a bool? If there is a documentList it returns the size of it, otherwise it returns 0; but it definitely always returns (and should return) a number.
> On Nov. 26, 2012, 6:51 p.m., Thorsten Zachmann wrote:
> > sheets/tests/TestInformationFunctions.cpp, line 338
> > <http://git.reviewboard.kde.org/r/107459/diff/2/?file=96152#file96152line338>
> >
> > This looks wrong. The test was working before and it should still work with the fix.
Yes, this change definitely seems wrong. Since you changed the implementation to return a bool you had to change the test to match, but you never should have changed the implementation to return a non-number.
- Marijn
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107459/#review22589
-----------------------------------------------------------
On Nov. 25, 2012, 4:44 p.m., Sujith Haridasan wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107459/
> -----------------------------------------------------------
>
> (Updated Nov. 25, 2012, 4:44 p.m.)
>
>
> Review request for Calligra, Arjen Hiemstra, Boudewijn Rempt, Inge Wallin, and C. Boemann.
>
>
> Description
> -------
>
> This patch helps to pass the issue in the http://build.kde.org/job/calligra_master/323/testReport/(root)/TestSuite/sheets_InformationFunctions/ because of which the test case TestInformationFunctions were failing.
>
>
> The failure is as below:
> FAIL! : Calligra::Sheets::TestInformationFunctions::testINFO() Compared values are not the same
> Actual (evaluate("ISNUMBER(INFO(\"numfile\"))",z)): Boolean: FALSE
> Expected ((z)): Boolean: TRUE
> Loc: [/srv/jenkins/workspace/calligra_master/sheets/tests/TestInformationFunctions.cpp(338)]
>
>
> Diffs
> -----
>
> libs/main/KoApplication.h b0bcab2
> libs/main/KoApplication.cpp 8ac4639
> sheets/functions/information.cpp 5ae962d
> sheets/tests/TestInformationFunctions.cpp d0adc68
>
> Diff: http://git.reviewboard.kde.org/r/107459/diff/
>
>
> Testing
> -------
>
> I had done testing on my host machine. And here is the output:
>
> sujith at kdekiddo:/media/kdedeveloper/kde-dev/kde/build/KDE/calligra/sheets/tests$ ./TestInformationFunctions
> ********* Start testing of Calligra::Sheets::TestInformationFunctions *********
> Config: Using QTest library 4.8.4, Qt 4.8.4
> QDEBUG : Calligra::Sheets::TestInformationFunctions::initTestCase() qttest(27285)/kdecore (KSycoca) KSycocaPrivate::openDatabase: Trying to open ksycoca from "/home/sujith/.kde-unit-test/cache-kdekiddo/ksycoca4"
> PASS : Calligra::Sheets::TestInformationFunctions::initTestCase()
> PASS : Calligra::Sheets::TestInformationFunctions::testAREAS()
> PASS : Calligra::Sheets::TestInformationFunctions::testCELL()
> PASS : Calligra::Sheets::TestInformationFunctions::testCOLUMN()
> PASS : Calligra::Sheets::TestInformationFunctions::testCOLUMNS()
> PASS : Calligra::Sheets::TestInformationFunctions::testCOUNT()
> PASS : Calligra::Sheets::TestInformationFunctions::testCOUNTA()
> PASS : Calligra::Sheets::TestInformationFunctions::testCOUNTBLANK()
> PASS : Calligra::Sheets::TestInformationFunctions::testCOUNTIF()
> PASS : Calligra::Sheets::TestInformationFunctions::testERRORTYPE()
> PASS : Calligra::Sheets::TestInformationFunctions::testFORMULA()
> PASS : Calligra::Sheets::TestInformationFunctions::testINFO()
> PASS : Calligra::Sheets::TestInformationFunctions::testISBLANK()
> PASS : Calligra::Sheets::TestInformationFunctions::testISERR()
> PASS : Calligra::Sheets::TestInformationFunctions::testISERROR()
> PASS : Calligra::Sheets::TestInformationFunctions::testISEVEN()
> PASS : Calligra::Sheets::TestInformationFunctions::testISFORMULA()
> PASS : Calligra::Sheets::TestInformationFunctions::testISLOGICAL()
> PASS : Calligra::Sheets::TestInformationFunctions::testISNONTEXT()
> PASS : Calligra::Sheets::TestInformationFunctions::testISNA()
> PASS : Calligra::Sheets::TestInformationFunctions::testISNUMBER()
> PASS : Calligra::Sheets::TestInformationFunctions::testISODD()
> PASS : Calligra::Sheets::TestInformationFunctions::testISTEXT()
> PASS : Calligra::Sheets::TestInformationFunctions::testISREF()
> PASS : Calligra::Sheets::TestInformationFunctions::testMATCH()
> PASS : Calligra::Sheets::TestInformationFunctions::testN()
> PASS : Calligra::Sheets::TestInformationFunctions::testNA()
> PASS : Calligra::Sheets::TestInformationFunctions::testROW()
> PASS : Calligra::Sheets::TestInformationFunctions::testROWS()
> PASS : Calligra::Sheets::TestInformationFunctions::testSHEET()
> PASS : Calligra::Sheets::TestInformationFunctions::testSHEETS()
> PASS : Calligra::Sheets::TestInformationFunctions::testTYPE()
> PASS : Calligra::Sheets::TestInformationFunctions::testVALUE()
> PASS : Calligra::Sheets::TestInformationFunctions::cleanupTestCase()
> Totals: 34 passed, 0 failed, 0 skipped
> ********* Finished testing of Calligra::Sheets::TestInformationFunctions *********
> sujith at kdekiddo:/media/kdedeveloper/kde-dev/kde/build/KDE/calligra/sheets/tests$
>
>
> Thanks,
>
> Sujith Haridasan
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20121127/e1fe919d/attachment.htm>
More information about the calligra-devel
mailing list