Bug 19858 - [QT3TS] require-all-optional-features-1-ns1 and others
[QT3TS] require-all-optional-features-1-ns1 and others
Status: CLOSED FIXED
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: XQuery 3 & XPath 3 Test Suite
Working drafts
PC Windows NT
: P2 normal
: ---
Assigned To: Ghislain Fourny
Mailing list for public feedback on specs from XSL and XML Query WGs
:
Depends on: 21130
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-05 13:37 UTC by Tim Mills
Modified: 2013-04-09 16:21 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Mills 2012-11-05 13:37:43 UTC
These tests don't make a great deal of sense for processors which can enable or disable a feature.

e.g.

  <test-case name="require-all-optional-features-1-ns1">
    <description>An error must be thrown if the feature is not supported.</description>
    <created by="Ghislain Fourny" on="2012-10-15"/>
    <modified by="O'Neil Delpratt, Saxonica" on="2012-10-23" change="assert-eq changed to assert-empty" />
    <modified by="Ghislain Fourny" on="2012-11-01" change="Duplicating tests depending on feature support." />
    <environment ref="dummy-schema"/>
    <dependency type="spec" value="XQ30+"/>
    <dependency type="feature" value="schemaAware" satisfied="false"/>
    <test>
      import schema namespace s = "http://www.w3.org/XQueryTest/RequireProhibitFeature";
      declare option require-feature "all-optional-features";
      ()
    </test>
    <result>
      <!-- The test must be reported to fail if a different error is returned -->
      <error code="XQST0120"/>
    </result>

The test driver sees

<dependency type="feature" value="schemaAware" satisfied="false"/>

and prepares a processor with this feature disabled.

Upon execution of the query, we then see

declare option require-feature "all-optional-features";

and enable it as requested.

This also affects the following tests.

 require-all-optional-features-1-ns3	
 require-all-optional-features-1-ns
 require-all-optional-features-2-ns2
 require-all-optional-features-3-ns3
 require-all-optional-features-5-ns
 require-higher-order-function-1-ns
 require-higher-order-function-10-ns
 require-higher-order-function-2-n
 require-higher-order-function-3-ns
 require-higher-order-function-4-ns
 require-higher-order-function-5-ns
 require-higher-order-function-6-ns
 require-higher-order-function-7-ns
 require-higher-order-function-8-ns
 require-higher-order-function-9-ns
 require-static-typing-1-ns
Comment 1 Tim Mills 2012-11-06 11:12:35 UTC
Here's a complete list of tests suffering this problem.

 prohibit-all-optional-features-2-ns	
 prohibit-all-optional-features-3-ns	
 require-all-optional-features-1-ns1	
 require-all-optional-features-1-ns2	
 require-all-optional-features-1-ns3	
 require-all-optional-features-1-ns4	
 require-all-optional-features-2-ns1	
 require-all-optional-features-2-ns2	
 require-all-optional-features-2-ns3	
 require-all-optional-features-3-ns1	
 require-all-optional-features-3-ns2	
 require-all-optional-features-3-ns3	
 require-all-optional-features-5-ns	
 require-all-optional-features-7-ns	
 require-higher-order-function-1-ns	
 require-higher-order-function-2-ns	
 require-higher-order-function-3-ns	
 require-higher-order-function-4-ns	
 require-higher-order-function-5-ns	
 require-module-1-ns	
 require-module-2-ns	
 require-schema-aware-1-ns	
 require-schema-aware-2-ns	
 require-schema-aware-4-ns	
 require-static-typing-1-ns	
 separate-modules-3-ns	
 separate-modules-4-ns	
 separate-modules-8-ns	
 separate-modules-9-ns
Comment 2 O'Neil Delpratt 2013-02-07 08:14:15 UTC
This needs WG consensus to agree on how this mechanism should work.
Comment 3 Ghislain Fourny 2013-02-26 16:09:32 UTC
Hi Tim,

When I wrote the tests, the semantics I had in mind is that if an engine is capable of activating/supporting a feature, the tests with a dependency set to false on these features should not be executed at all because they do not apply.

The goal of these tests is to make sure that an engine that does not support these features returns the appropriate error messages.

Does it make sense?
Comment 4 Tim Mills 2013-02-26 21:10:22 UTC
Further investigation shows that the specification makes provision for a processor to disable a feature which it supports in response to a prohibit-feature declaration, but there is no corresponding provision for a processor to enable a feature in response to a require-feature declaration which it supports but which is not enabled by default.

I will raise this as a separate bug.
Comment 5 Tim Mills 2013-03-21 10:53:31 UTC
Test separate-modules-4-ns remains in error.

The test requires module import, but not higher order functions.

The main module imports a module.

module:one() returns a function item.

The main module attempts to invoke the function item.  But it the main module, the higher order functions feature remains prohibited.  Therefore XQST0129 should be expected.
Comment 6 Tim Mills 2013-04-09 16:21:43 UTC
I think these have all now been fixed.