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

Proposed by Nicolae Brinza on 2011-11-07
Status: Superseded
Proposed branch: lp:~nbrinza/zorba/bugs
Merge into: lp:zorba
Diff against target: 68 lines (+22/-5)
2 files modified
ChangeLog (+2/-1)
src/types/typeimpl.cpp (+20/-4)
To merge this branch: bzr merge lp:~nbrinza/zorba/bugs
Reviewer Review Type Date Requested Status
Matthias Brantner 2011-11-07 Approve on 2011-11-07
Review via email: mp+81424@code.launchpad.net

This proposal supersedes a proposal from 2011-11-06.

This proposal has been superseded by a proposal from 2011-11-07.

Commit message

Fix for lp: bug #867256 - test Steps-leading-lone-slash-8a is failing

Description of the change

Fix for lp: bug #867256 - test Steps-leading-lone-slash-8a is failing

To post a comment you must log in.
Matthias Brantner (matthias-brantner) wrote : Posted in a previous version of this proposal

Nicolae, could you please also update the ChangeLog?

review: Needs Fixing
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

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

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:272 (message):
  Validation queue job bugs-2011-11-03T02-45-02.853Z is finished. The final
  status was:

  1 tests did not succeed - changes not commited.

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

Zorba Build Bot (zorba-buildbot) wrote :
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bugs-2011-11-07T17-26-04.331Z is finished. The final status was:

All tests succeeded!

Zorba Build Bot (zorba-buildbot) wrote :

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

Zorba Build Bot (zorba-buildbot) wrote :
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bugs-2011-11-07T17-48-33.425Z is finished. The final status was:

All tests succeeded!

Zorba Build Bot (zorba-buildbot) wrote :

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

review: Approve
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue starting for merge proposal.
Log at: http://zorbatest.lambda.nu:8080/remotequeue/bugs-2011-11-07T18-09-02.8Z/log.html

Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bugs-2011-11-07T18-09-02.8Z is finished. The final status was:

All tests succeeded!

Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1. Got: 1 Approve.

lp:~nbrinza/zorba/bugs updated on 2012-12-14
10538. By Nicolae Brinza on 2011-12-14

Merged changes from Zorba trunk

10539. By Nicolae Brinza on 2011-12-15

Related to the Steps-leading-lone-slash-8a test: removed an unecessary condition from typeimpl.cpp. Removed the expected failure for the said test.

10540. By Nicolae Brinza on 2011-12-16

Merged with Zorba trunk

10541. By Nicolae Brinza on 2011-12-17

Added tests for the document-node(schema-element()) node test, used as variable types and in 'instance of' expressions

10542. By Nicolae Brinza on 2011-12-17

Added test results files for the previous commit (tests for document-node(schema-element()) node test)

10543. By Nicolae Brinza on 2011-12-17

Added spec files for tests with the document-node(schema-element()) node tests

10544. By Nicolae Brinza on 2011-12-20

Merged with Zorba trunk

10545. By Nicolae Brinza on 2012-03-15

Merged with Zorba trunk

10546. By Nicolae Brinza on 2012-03-17

Merged with Zorba trunk

10547. By Nicolae Brinza on 2012-05-10

Merged with Zorba trunk

10548. By Nicolae Brinza on 2012-06-21

Merged with Zorba trunk

10549. By Nicolae Brinza on 2012-06-21

Fixed the 6 failing doc-node-schema-elem-test- tests

10550. By Nicolae Brinza on 2012-12-14

Merged with Zorba trunk

Unmerged revisions

10550. By Nicolae Brinza on 2012-12-14

Merged with Zorba trunk

10549. By Nicolae Brinza on 2012-06-21

Fixed the 6 failing doc-node-schema-elem-test- tests

10548. By Nicolae Brinza on 2012-06-21

Merged with Zorba trunk

10547. By Nicolae Brinza on 2012-05-10

Merged with Zorba trunk

10546. By Nicolae Brinza on 2012-03-17

Merged with Zorba trunk

10545. By Nicolae Brinza on 2012-03-15

Merged with Zorba trunk

10544. By Nicolae Brinza on 2011-12-20

Merged with Zorba trunk

10543. By Nicolae Brinza on 2011-12-17

Added spec files for tests with the document-node(schema-element()) node tests

10542. By Nicolae Brinza on 2011-12-17

Added test results files for the previous commit (tests for document-node(schema-element()) node test)

10541. By Nicolae Brinza on 2011-12-17

Added tests for the document-node(schema-element()) node test, used as variable types and in 'instance of' expressions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2011-11-04 11:40:20 +0000
3+++ ChangeLog 2011-11-07 02:14:25 +0000
4@@ -1,7 +1,8 @@
5 Zorba - The XQuery Processor
6
7 version 2.x
8-
9+
10+ * Fixed bug #867256 (document-node(element(x)) types and tests were not working correctly)
11 * Custom Full-text thesaurus.
12 * Fixed bug #3401971 (node-by-reference on dynamic collections)
13 * Optimization for positioned sequence access (e.g. $x[$x[1]] where $x is a
14
15=== modified file 'src/types/typeimpl.cpp'
16--- src/types/typeimpl.cpp 2011-07-01 05:22:12 +0000
17+++ src/types/typeimpl.cpp 2011-11-07 02:14:25 +0000
18@@ -361,7 +361,7 @@
19
20
21 bool NodeXQType::is_subtype(
22- const TypeManager* tm,
23+ const TypeManager* tm,
24 const NodeXQType& supertype,
25 const QueryLoc& loc) const
26 {
27@@ -443,7 +443,7 @@
28
29
30 bool NodeXQType::is_supertype(
31- const TypeManager* tm,
32+ const TypeManager* tm,
33 const store::Item* subitem,
34 const QueryLoc& loc) const
35 {
36@@ -488,14 +488,30 @@
37 }
38 }
39
40- if (m_node_kind != store::StoreConsts::elementNode &&
41- m_node_kind != store::StoreConsts::attributeNode)
42+ // document-node( E ) matches any document node that contains exactly one element
43+ // node, optionally accompanied by one or more comment and processing instruction
44+ // nodes, if E is an ElementTest or SchemaElementTest that matches the element node.
45+ bool is_element_test = (
46+ m_node_kind == store::StoreConsts::documentNode &&
47+ m_content_type != NULL &&
48+ m_content_type->type_kind() == XQType::NODE_TYPE_KIND &&
49+ dynamic_cast<const NodeXQType*>(m_content_type.getp())->m_schema_test == false);
50+
51+ if (m_node_kind != store::StoreConsts::elementNode &&
52+ m_node_kind != store::StoreConsts::attributeNode &&
53+ !is_element_test)
54 return true;
55
56 if (m_content_type == NULL ||
57 m_content_type->type_kind() == XQType::ANY_TYPE_KIND)
58 return true;
59
60+ if (is_element_test)
61+ {
62+ xqtref_t documentNodeType = tm->create_value_type(subitem, loc);
63+ return TypeOps::is_subtype(tm, *documentNodeType, *this);
64+ }
65+
66 xqtref_t subContentType = tm->create_named_type(subitem->getType(),
67 TypeConstants::QUANT_ONE,
68 loc,

Subscribers

People subscribed via source and target branches