Merge lp:~zorba-coders/zorba/bug1090083-deepEqual into lp:zorba

Proposed by Cezar Andrei
Status: Merged
Approved by: Sorin Marian Nasoi
Approved revision: 11356
Merged at revision: 11371
Proposed branch: lp:~zorba-coders/zorba/bug1090083-deepEqual
Merge into: lp:zorba
Diff against target: 58 lines (+18/-5)
2 files modified
src/runtime/sequences/sequences_impl.cpp (+18/-3)
test/fots/CMakeLists.txt (+0/-2)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug1090083-deepEqual
Reviewer Review Type Date Requested Status
Sorin Marian Nasoi Approve
Cezar Andrei Approve
Review via email: mp+158509@code.launchpad.net

Commit message

Fix deep-equal bug 1090083.

Description of the change

Fix deep-equal bug 1090083.

To post a comment you must log in.
Revision history for this message
Cezar Andrei (cezar-andrei) :
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 bug1090083-deepEqual-2013-04-11T23-43-00.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, 1 Pending.

Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) :
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 bug1090083-deepEqual-2013-04-15T13-13-51.893Z 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/sequences/sequences_impl.cpp'
--- src/runtime/sequences/sequences_impl.cpp 2013-03-26 18:10:32 +0000
+++ src/runtime/sequences/sequences_impl.cpp 2013-04-11 23:41:34 +0000
@@ -926,6 +926,17 @@
926 if (! item1->getNodeName()->equals(item2->getNodeName()))926 if (! item1->getNodeName()->equals(item2->getNodeName()))
927 return false;927 return false;
928928
929 TypeManager* tm = sctx->get_typemanager();
930
931 xqtref_t type1 = tm->create_value_type(item1.getp());
932 xqtref_t type2 = tm->create_value_type(item2.getp());
933
934 const NodeXQType* nodeType1 = static_cast<const NodeXQType *>(type1.getp());
935 const NodeXQType* nodeType2 = static_cast<const NodeXQType *>(type2.getp());
936
937 if ( nodeType1->get_content_type()->content_kind() != nodeType2->get_content_type()->content_kind() )
938 return false;
939
929 return (DeepEqualAttributes(loc,940 return (DeepEqualAttributes(loc,
930 sctx,941 sctx,
931 dctx,942 dctx,
@@ -1093,6 +1104,13 @@
1093 item1->isJSONArray() != item2->isJSONArray())1104 item1->isJSONArray() != item2->isJSONArray())
1094 return false;1105 return false;
10951106
1107
1108 xqtref_t type1 = tm->create_value_type(item1.getp());
1109 xqtref_t type2 = tm->create_value_type(item2.getp());
1110
1111 if ( type1->content_kind() != type2->content_kind() )
1112 return false;
1113
1096 if (item1->isAtomic())1114 if (item1->isAtomic())
1097 {1115 {
1098 assert(item2->isAtomic());1116 assert(item2->isAtomic());
@@ -1102,9 +1120,6 @@
1102 collator = sctx->get_default_collator(QueryLoc::null);1120 collator = sctx->get_default_collator(QueryLoc::null);
11031121
1104 // check NaN1122 // check NaN
1105 xqtref_t type1 = tm->create_value_type(item1.getp());
1106 xqtref_t type2 = tm->create_value_type(item2.getp());
1107
1108 if (((TypeOps::is_subtype(tm, *type1, *rtm.FLOAT_TYPE_ONE)1123 if (((TypeOps::is_subtype(tm, *type1, *rtm.FLOAT_TYPE_ONE)
1109 &&1124 &&
1110 item1->getFloatValue().isNaN())1125 item1->getFloatValue().isNaN())
11111126
=== modified file 'test/fots/CMakeLists.txt'
--- test/fots/CMakeLists.txt 2013-04-11 18:13:48 +0000
+++ test/fots/CMakeLists.txt 2013-04-11 23:41:34 +0000
@@ -130,8 +130,6 @@
130EXPECTED_FOTS_FAILURE (fn-available-environment-variables fn-available-environment-variables-011 0)130EXPECTED_FOTS_FAILURE (fn-available-environment-variables fn-available-environment-variables-011 0)
131EXPECTED_FOTS_FAILURE (fn-deep-equal K2-SeqDeepEqualFunc-36 0)131EXPECTED_FOTS_FAILURE (fn-deep-equal K2-SeqDeepEqualFunc-36 0)
132EXPECTED_FOTS_FAILURE (fn-deep-equal K2-SeqDeepEqualFunc-37 0)132EXPECTED_FOTS_FAILURE (fn-deep-equal K2-SeqDeepEqualFunc-37 0)
133EXPECTED_FOTS_FAILURE (fn-deep-equal K2-SeqDeepEqualFunc-38 0)
134EXPECTED_FOTS_FAILURE (fn-deep-equal K2-SeqDeepEqualFunc-39 0)
135EXPECTED_FOTS_FAILURE (fn-distinct-values cbcl-distinct-values-002 0)133EXPECTED_FOTS_FAILURE (fn-distinct-values cbcl-distinct-values-002 0)
136EXPECTED_FOTS_FAILURE (fn-distinct-values cbcl-distinct-values-002b 0)134EXPECTED_FOTS_FAILURE (fn-distinct-values cbcl-distinct-values-002b 0)
137EXPECTED_FOTS_FAILURE (fn-environment-variable environment-variable-005 0)135EXPECTED_FOTS_FAILURE (fn-environment-variable environment-variable-005 0)

Subscribers

People subscribed via source and target branches