Bug 302848 - kcalc fails tests
Summary: kcalc fails tests
Status: RESOLVED FIXED
Alias: None
Product: kcalc
Classification: Applications
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Evan Teran
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-01 18:23 UTC by stupor_scurvy343
Modified: 2012-09-05 15:40 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
patch fixing some tests, formatting and configure issue (10.65 KB, patch)
2012-07-01 18:23 UTC, stupor_scurvy343
Details

Note You need to log in before you can comment on or make changes to this bug.
Description stupor_scurvy343 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 stupor_scurvy343 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 stupor_scurvy343 2012-09-05 15:40:06 UTC
As of 5c475a30ec311ad2ec3161a1d6cb1b3d5524fc39, tests pass fine!