[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: Re: Notes on koffice unit tests
From: Brad Hards <bradh () frogmouth ! net>
Date: 2007-03-17 11:39:05
Message-ID: 200703172239.11574.bradh () frogmouth ! net
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Sunday 11 February 2007 20:40, Stefan Nikolaus wrote:
> On Sunday 11 February 2007 01:36:00 Brad Hards wrote:
> > 32 is failing because VALUE() doesn't parse fractions yet. I'm waiting on
> > some info from Stefan on how to proceed on this.
>
> Feel free to extend ValueParser to parse fractions. The VALUE() definition
> contains a regular expression, which you can use for this. I've recently
> added the ability to parse complex numbers. You can put this fractional
> stuff into the same method: ValueParser::tryParseNumber().
I finally got around to doing this. We now handle fractions and times as
numbers. I also changed a couple of tests to only use 10 digits (previously
15).
There are still problems though
Start processing tests
Test project /home/bradh/build/koffice-build/kspread
1/ 14 Testing kspread-Formula ***Failed
2/ 14 Testing kspread-OpenFormula Passed
3/ 14 Testing kpsread-RTree Passed
4/ 14 Testing kspread-Value Passed
5/ 14 Testing kspread-MathFunctions Passed
6/ 14 Testing kspread-FinancialFunctions Passed
7/ 14 Testing kspread-TrigFunctions Passed
8/ 14 Testing kspread-PointStorage Passed
9/ 14 Testing kspread-BitopsFunctions Passed
10/ 14 Testing kspread-InformationFunctions ***Exception: SegFault
11/ 14 Testing kspread-EngineeringFunctions ***Failed
12/ 14 Testing kspread-LogicFunctions Passed
13/ 14 Testing kspread-StatisticalFunctions Passed
14/ 14 Testing kspread-TextFunctions Passed
79% tests passed, 3 tests failed out of 14
The following tests FAILED:
1 - kspread-Formula (Failed)
10 - kspread-InformationFunctions (SEGFAULT)
11 - kspread-EngineeringFunctions (Failed)
There is something wacky going on with the first test. If I do
=abs(-1)+abs(-1), it fails to parse.
but if either are abs(1) instead, it works as expected (==2).
Test 10 is segfaulting,in what might be a test setup problem (but why/how I'm
not sure). It might not be hard to fix the actual parse problem though.
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208596784 (LWP 6226)]
KSpread::Doc::referenceDate (this=0xa)
at /home/bradh/coding/koffice/kspread/Doc.cpp:2309
2309 return d->refDate;
(gdb) bt
#0 KSpread::Doc::referenceDate (this=0xa)
at /home/bradh/coding/koffice/kspread/Doc.cpp:2309
#1 0x0039ba08 in Value (this=0xbff350c0, date=@0xbff34b84, doc=0xa)
at /home/bradh/coding/koffice/kspread/Value.cpp:313
#2 0x00497b68 in func_date (args=@0xbff34c38, calc=0x9eea460)
at /home/bradh/coding/koffice/kspread/functions/datetime.cpp:535
#3 0x002ccc0c in KSpread::Function::exec (this=0x9e8f6f8, args=@0xbff350ec,
calc=0x9eea460, extra=0xbff34f84)
at /home/bradh/coding/koffice/kspread/Functions.cpp:166
#4 0x002ca646 in KSpread::Formula::eval (this=0xbff35134)
at /home/bradh/coding/koffice/kspread/Formula.cpp:1592
#5 0x080498ba in KSpread::TestInformationFunctions::evaluate
(this=0xbff35e68, formula=@0xbff35294, ex=@0xbff35180)
at /home/bradh/coding/koffice/kspread/tests/TestInformationFunctions.cpp:34
#6 0x0804ac22 in KSpread::TestInformationFunctions::testVALUE
(this=0xbff35e68)
at /home/bradh/coding/koffice/kspread/tests/TestInformationFunctions.cpp:71
Test 11 is failing for one of the complex number functions.
FAIL! : KSpread::TestEngineeringFunctions::testIMCONJUGATE() Compared values
are not the same
Actual
(evaluate("=IMABS(IMSUB(IMCONJUGATE(COMPLEX(-3;-4));COMPLEX(-3;4)))")):
Error(#NAME?)
Expected (RoundNumber(0.0)): String: 0
Loc:
[/home/bradh/coding/koffice/kspread/tests/TestEngineeringFunctions.cpp(105)]
Brad
[Attachment #5 (application/pgp-signature)]
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic