Merge lp:~nbrinza/zorba/bugs2 into lp:zorba

Proposed by Nicolae Brinza
Status: Merged
Approved by: Nicolae Brinza
Approved revision: 11025
Merged at revision: 11358
Proposed branch: lp:~nbrinza/zorba/bugs2
Merge into: lp:zorba
Diff against target: 101 lines (+25/-16)
3 files modified
src/runtime/core/arithmetic_impl.cpp (+22/-5)
src/zorbatypes/datetime/duration.cpp (+3/-1)
test/fots/CMakeLists.txt (+0/-10)
To merge this branch: bzr merge lp:~nbrinza/zorba/bugs2
Reviewer Review Type Date Requested Status
Nicolae Brinza Approve
Sorin Marian Nasoi Approve
Chris Hillery Approve
Review via email: mp+157752@code.launchpad.net

Commit message

More datetime/duration fixes.

Description of the change

More datetime/duration fixes.

To post a comment you must log in.
Revision history for this message
Nicolae Brinza (nbrinza) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~nbrinza/zorba/bugs2 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 (message):
  Validation queue job bugs2-2013-04-08T21-02-54.335Z is finished. The final
  status was:

  30 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

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 bugs2-2013-04-08T21-34-55.846Z 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, 1 Pending.

Revision history for this message
Nicolae Brinza (nbrinza) :
review: Approve
Revision history for this message
Chris Hillery (ceejatec) :
review: Approve
Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Attempt to merge into lp:zorba failed due to conflicts:

text conflict in test/fots/CMakeLists.txt

lp:~nbrinza/zorba/bugs2 updated
11025. By Nicolae Brinza

Merged with Zorba trunk

Revision history for this message
Nicolae Brinza (nbrinza) :
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 bugs2-2013-04-10T06-19-42.473Z 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
=== modified file 'src/runtime/core/arithmetic_impl.cpp'
--- src/runtime/core/arithmetic_impl.cpp 2013-04-01 21:52:20 +0000
+++ src/runtime/core/arithmetic_impl.cpp 2013-04-10 05:51:22 +0000
@@ -260,7 +260,13 @@
260 compute<store::XS_DATETIME,store::XS_DATETIME>260 compute<store::XS_DATETIME,store::XS_DATETIME>
261 (result, dctx, tm, &aLoc, n0, n1);261 (result, dctx, tm, &aLoc, n0, n1);
262 }262 }
263 else if (TypeOps::is_subtype(tm, *type1, *rtm.DURATION_TYPE_ONE ))263 else if (TypeOps::is_subtype(tm, *type1, *rtm.YM_DURATION_TYPE_ONE ))
264 {
265 return Operation::template
266 compute<store::XS_DATETIME,store::XS_DURATION>
267 (result, dctx, tm, &aLoc, n0, n1);
268 }
269 else if (TypeOps::is_subtype(tm, *type1, *rtm.DT_DURATION_TYPE_ONE ))
264 {270 {
265 return Operation::template271 return Operation::template
266 compute<store::XS_DATETIME,store::XS_DURATION>272 compute<store::XS_DATETIME,store::XS_DURATION>
@@ -275,7 +281,13 @@
275 compute<store::XS_DATE,store::XS_DATE>281 compute<store::XS_DATE,store::XS_DATE>
276 (result, dctx, tm, &aLoc, n0, n1);282 (result, dctx, tm, &aLoc, n0, n1);
277 }283 }
278 else if (TypeOps::is_subtype(tm, *type1, *rtm.DURATION_TYPE_ONE))284 else if (TypeOps::is_subtype(tm, *type1, *rtm.YM_DURATION_TYPE_ONE))
285 {
286 return Operation::template
287 compute<store::XS_DATE,store::XS_DURATION>
288 (result, dctx, tm, &aLoc, n0, n1);
289 }
290 else if (TypeOps::is_subtype(tm, *type1, *rtm.DT_DURATION_TYPE_ONE))
279 {291 {
280 return Operation::template292 return Operation::template
281 compute<store::XS_DATE,store::XS_DURATION>293 compute<store::XS_DATE,store::XS_DURATION>
@@ -732,7 +744,10 @@
732 const store::Item* i0,744 const store::Item* i0,
733 const store::Item* i1 )745 const store::Item* i1 )
734{746{
735 xs_decimal d = i0->getYearMonthDurationValue() / i1->getYearMonthDurationValue();747 xs_yearMonthDuration otherYMDuration = i1->getYearMonthDurationValue();
748 if (otherYMDuration.isZero())
749 throw XQUERY_EXCEPTION( err::FOAR0001, ERROR_LOC( loc ) );
750 xs_decimal d = i0->getYearMonthDurationValue() / otherYMDuration;
736 return GENV_ITEMFACTORY->createDecimal(result, d);751 return GENV_ITEMFACTORY->createDecimal(result, d);
737}752}
738753
@@ -746,8 +761,10 @@
746 const store::Item* i0,761 const store::Item* i0,
747 const store::Item* i1 )762 const store::Item* i1 )
748{763{
749 xs_decimal d = i0->getDayTimeDurationValue() / i1->getDayTimeDurationValue();764 xs_dayTimeDuration otherDTDuration = i1->getDayTimeDurationValue();
750765 if (otherDTDuration.isZero())
766 throw XQUERY_EXCEPTION( err::FOAR0001, ERROR_LOC(loc));
767 xs_decimal d = i0->getDayTimeDurationValue() / otherDTDuration;
751 return GENV_ITEMFACTORY->createDecimal(result, d);768 return GENV_ITEMFACTORY->createDecimal(result, d);
752}769}
753770
754771
=== modified file 'src/zorbatypes/datetime/duration.cpp'
--- src/zorbatypes/datetime/duration.cpp 2013-04-02 20:15:53 +0000
+++ src/zorbatypes/datetime/duration.cpp 2013-04-10 05:51:22 +0000
@@ -817,7 +817,9 @@
817817
818818
819Decimal Duration::operator/(const Duration& d) const819Decimal Duration::operator/(const Duration& d) const
820{820{
821 if (d.isZero())
822 XQUERY_EXCEPTION(err::FOAR0001);
821 return Decimal( getTotalSeconds() ) / Decimal( d.getTotalSeconds() );823 return Decimal( getTotalSeconds() ) / Decimal( d.getTotalSeconds() );
822}824}
823825
824826
=== modified file 'test/fots/CMakeLists.txt'
--- test/fots/CMakeLists.txt 2013-04-09 23:40:45 +0000
+++ test/fots/CMakeLists.txt 2013-04-10 05:51:22 +0000
@@ -260,7 +260,6 @@
260EXPECTED_FOTS_FAILURE (fn-unparsed-text-lines fn-unparsed-text-lines-053 0)260EXPECTED_FOTS_FAILURE (fn-unparsed-text-lines fn-unparsed-text-lines-053 0)
261EXPECTED_FOTS_FAILURE (fn-unparsed-text-lines fn-unparsed-text-lines-054 0)261EXPECTED_FOTS_FAILURE (fn-unparsed-text-lines fn-unparsed-text-lines-054 0)
262EXPECTED_FOTS_FAILURE (math-acos math-acos-003 0)262EXPECTED_FOTS_FAILURE (math-acos math-acos-003 0)
263EXPECTED_FOTS_FAILURE (misc-CombinedErrorCodes FOAR0001_9 0)
264EXPECTED_FOTS_FAILURE (misc-CombinedErrorCodes XQST0085 0)263EXPECTED_FOTS_FAILURE (misc-CombinedErrorCodes XQST0085 0)
265EXPECTED_FOTS_FAILURE (misc-CombinedErrorCodes XQST0093a 0)264EXPECTED_FOTS_FAILURE (misc-CombinedErrorCodes XQST0093a 0)
266EXPECTED_FOTS_FAILURE (misc-CombinedErrorCodes XQTY0086_3 0)265EXPECTED_FOTS_FAILURE (misc-CombinedErrorCodes XQTY0086_3 0)
@@ -275,15 +274,6 @@
275EXPECTED_FOTS_FAILURE (misc-Serialization K2-Serialization-11 0)274EXPECTED_FOTS_FAILURE (misc-Serialization K2-Serialization-11 0)
276EXPECTED_FOTS_FAILURE (misc-XMLEdition XML10-4ed-Excluded-char-1 0)275EXPECTED_FOTS_FAILURE (misc-XMLEdition XML10-4ed-Excluded-char-1 0)
277EXPECTED_FOTS_FAILURE (misc-XMLEdition XML11-1ed-Included-char-1 0)276EXPECTED_FOTS_FAILURE (misc-XMLEdition XML11-1ed-Included-char-1 0)
278EXPECTED_FOTS_FAILURE (op-add-dayTimeDurations cbcl-plus-002 0)
279EXPECTED_FOTS_FAILURE (op-add-dayTimeDurations cbcl-plus-004 0)
280EXPECTED_FOTS_FAILURE (op-add-dayTimeDurations cbcl-plus-006 0)
281EXPECTED_FOTS_FAILURE (op-add-dayTimeDurations cbcl-plus-008 0)
282EXPECTED_FOTS_FAILURE (op-divide-yearMonthDuration-by-yearMonthDuration cbcl-divide-yearMonthDuration-by-yearMonthDuration-001 0)
283EXPECTED_FOTS_FAILURE (op-subtract-dayTimeDurations cbcl-minus-002 0)
284EXPECTED_FOTS_FAILURE (op-subtract-dayTimeDurations cbcl-minus-004 0)
285EXPECTED_FOTS_FAILURE (op-subtract-dayTimeDurations cbcl-minus-006 0)
286EXPECTED_FOTS_FAILURE (op-subtract-dayTimeDurations cbcl-minus-008 0)
287EXPECTED_FOTS_FAILURE (prod-AllowingEmpty outer-013 0)277EXPECTED_FOTS_FAILURE (prod-AllowingEmpty outer-013 0)
288EXPECTED_FOTS_FAILURE (prod-Annotation annotation-3 0)278EXPECTED_FOTS_FAILURE (prod-Annotation annotation-3 0)
289EXPECTED_FOTS_FAILURE (prod-Annotation annotation-26 0)279EXPECTED_FOTS_FAILURE (prod-Annotation annotation-26 0)

Subscribers

People subscribed via source and target branches