Merge lp:~paul-lucas/zorba/pjl-misc into lp:zorba

Proposed by Paul J. Lucas
Status: Merged
Approved by: Matthias Brantner
Approved revision: 11215
Merged at revision: 11454
Proposed branch: lp:~paul-lucas/zorba/pjl-misc
Merge into: lp:zorba
Diff against target: 19 lines (+4/-3)
1 file modified
src/zorbatypes/integer.cpp (+4/-3)
To merge this branch: bzr merge lp:~paul-lucas/zorba/pjl-misc
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Paul J. Lucas Approve
Review via email: mp+164054@code.launchpad.net

Commit message

Better float-to-int-overflow checking -- fixes two FOTS tests.
Better string-to-integer conversion exception catching -- fixes 3 FOTS tests.

Description of the change

Better float-to-int-overflow checking -- fixes two FOTS tests.
Better string-to-integer conversion exception catching -- fixes 3 FOTS tests.

To post a comment you must log in.
Revision history for this message
Paul J. Lucas (paul-lucas) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job pjl-misc-2013-05-16T00-26-40.553Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1, Needs Information < 1, Resubmit < 1. Got: 1 Approve.

Revision history for this message
Matthias Brantner (matthias-brantner) wrote :

If it fixes 5 FOTS tests, why don't they have to be removed from the expected failures?

review: Needs Information
Revision history for this message
Paul J. Lucas (paul-lucas) wrote :

3 are wrong errors; the other two -- good question.

Revision history for this message
Paul J. Lucas (paul-lucas) wrote :

Oh I think it's because the other two fail only with BIG_INTEGER=OFF whereas the RQ runs with it ON.

Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job pjl-misc-2013-05-16T01-08-38.308Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/zorbatypes/integer.cpp'
2--- src/zorbatypes/integer.cpp 2013-05-15 23:22:01 +0000
3+++ src/zorbatypes/integer.cpp 2013-05-16 00:22:26 +0000
4@@ -56,12 +56,13 @@
5 #ifndef ZORBA_WITH_BIG_INTEGER
6 template<class T>
7 typename IntegerImpl<T>::value_type IntegerImpl<T>::ftoi( double d ) {
8- value_type const v( d >= 0 ? floor( d ) : ceil( d ) );
9- if ( v < 0 && d > 0 )
10+ d = d >= 0 ? floor( d ) : ceil( d );
11+ value_type const i = d;
12+ if ( i != d )
13 throw range_error(
14 BUILD_STRING( '"', d, "\": value too large for integer" )
15 );
16- return v;
17+ return i;
18 }
19 #endif /* ZORBA_WITH_BIG_INTEGER */
20

Subscribers

People subscribed via source and target branches