Bug 302848

Summary: kcalc fails tests
Product: [Applications] kcalc Reporter: Michael Palimaka <kensington>
Component: generalAssignee: Evan Teran <eteran>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: patch fixing some tests, formatting and configure issue

Description Michael Palimaka 2012-07-01 18:23:03 UTC
Created attachment 72261 [details]
patch fixing some tests, formatting and configure issue

Using git master, a number of tests fail.

The attached patch corrects a quite a few (as well as a formatting and configure issue), but there are still a few I couldn't figure out.

With the patch applied, the first failing test:

Testing divisions:
Testing result of: KNumber(5) / KNumber(2) should give 5/2 and gives 5/2....
The type of the result should be Fraction and gives Fraction....  OK
Testing result of: KNumber(122) / KNumber(2) should give 61 and gives 61....
The type of the result should be Integer and gives Integer....  OK
Testing result of: KNumber(12) / KNumber(0) should give inf and gives inf....
The type of the result should be Special and gives Special....  OK
Testing result of: KNumber(-12) / KNumber(0) should give -inf and gives inf....
The type of the result should be Special and gives Special....  Failed
Comment 1 Evan Teran 2012-07-04 13:11:27 UTC
Comment on attachment 72261 [details]
patch fixing some tests, formatting and configure issue

Yea, I'm currently working on a new knumber library and in the process of doing regression tests I noticed that many of the tests are broken. In fact, probably more than the ones you found!

I'll apply this patch and see if I can get the tests passing!

Thanks.
Comment 2 Evan Teran 2012-07-16 13:14:32 UTC
ok, i've applied the patch to SVN and now want to fix that failed test you've encountered.

One quick question. How exactly are you running the test suite. I'm not the author of the test code so I'm not terribly familiar with it. I've tried doing a:

cmake .
make test

but that just fails.

I can of course manually compile the test code with the knumber lib, but that's a hack and i'd rather have a proper regression test going.
Comment 3 Michael Palimaka 2012-07-16 16:57:40 UTC
I am running the tests as follows:

cmake . -DKDE4_BUILD_TESTS=true
make -j5
make test
less Testing/Temporary/LastTest.log
Comment 4 Michael Palimaka 2012-09-05 15:40:06 UTC
As of 5c475a30ec311ad2ec3161a1d6cb1b3d5524fc39, tests pass fine!