| /******************************************************************************* |
| * Copyright (c) 2009 Standards for Technology in Automotive Retail and others. |
| * All rights reserved. This program and the accompanying materials |
| * are made available under the terms of the Eclipse Public License v1.0 |
| * which accompanies this distribution, and is available at |
| * http://www.eclipse.org/legal/epl-v10.html |
| * |
| * Contributors: |
| * David Carver - STAR - initial api and implementation bug 262765 |
| *******************************************************************************/ |
| |
| package org.eclipse.wst.xml.xpath2.processor.testsuite.functions; |
| |
| import java.net.URL; |
| |
| import org.apache.xerces.xs.XSModel; |
| import org.eclipse.wst.xml.xpath2.processor.DynamicError; |
| import org.eclipse.wst.xml.xpath2.processor.ResultSequence; |
| import org.eclipse.wst.xml.xpath2.processor.StaticError; |
| import org.eclipse.wst.xml.xpath2.processor.XPathParserException; |
| import org.eclipse.wst.xml.xpath2.processor.test.AbstractPsychoPathTest; |
| |
| |
| public class SeqBooleanFuncTest extends AbstractPsychoPathTest { |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:int(lower bound). |
| public void test_fn_booleanint1args_1() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanint1args-1.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanint1args-1.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:int(mid range). |
| public void test_fn_booleanint1args_2() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanint1args-2.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanint1args-2.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:int(upper bound). |
| public void test_fn_booleanint1args_3() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanint1args-3.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanint1args-3.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:integer(lower bound). |
| public void test_fn_booleanintg1args_1() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanintg1args-1.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanintg1args-1.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:integer(mid range). |
| public void test_fn_booleanintg1args_2() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanintg1args-2.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanintg1args-2.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:integer(upper bound). |
| public void test_fn_booleanintg1args_3() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanintg1args-3.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanintg1args-3.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:decimal(lower bound). |
| public void test_fn_booleandec1args_1() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleandec1args-1.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleandec1args-1.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:decimal(mid range). |
| public void test_fn_booleandec1args_2() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleandec1args-2.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleandec1args-2.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:decimal(upper bound). |
| public void test_fn_booleandec1args_3() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleandec1args-3.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleandec1args-3.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:double(lower bound). |
| public void test_fn_booleandbl1args_1() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleandbl1args-1.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleandbl1args-1.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:double(mid range). |
| public void test_fn_booleandbl1args_2() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleandbl1args-2.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleandbl1args-2.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:double(upper bound). |
| public void test_fn_booleandbl1args_3() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleandbl1args-3.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleandbl1args-3.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:float(lower bound). |
| public void test_fn_booleanflt1args_1() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanflt1args-1.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanflt1args-1.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:float(mid range). |
| public void test_fn_booleanflt1args_2() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanflt1args-2.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanflt1args-2.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:float(upper bound). |
| public void test_fn_booleanflt1args_3() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanflt1args-3.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanflt1args-3.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:long(lower bound). |
| public void test_fn_booleanlng1args_1() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanlng1args-1.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanlng1args-1.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:long(mid range). |
| public void test_fn_booleanlng1args_2() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanlng1args-2.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanlng1args-2.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:long(upper bound). |
| public void test_fn_booleanlng1args_3() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanlng1args-3.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanlng1args-3.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:unsignedShort(lower bound). |
| public void test_fn_booleanusht1args_1() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanusht1args-1.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanusht1args-1.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:unsignedShort(mid range). |
| public void test_fn_booleanusht1args_2() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanusht1args-2.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanusht1args-2.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:unsignedShort(upper bound). |
| public void test_fn_booleanusht1args_3() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanusht1args-3.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanusht1args-3.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:negativeInteger(lower bound). |
| public void test_fn_booleannint1args_1() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleannint1args-1.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleannint1args-1.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:negativeInteger(mid range). |
| public void test_fn_booleannint1args_2() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleannint1args-2.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleannint1args-2.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:negativeInteger(upper bound). |
| public void test_fn_booleannint1args_3() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleannint1args-3.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleannint1args-3.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:positiveInteger(lower bound). |
| public void test_fn_booleanpint1args_1() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanpint1args-1.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanpint1args-1.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:positiveInteger(mid range). |
| public void test_fn_booleanpint1args_2() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanpint1args-2.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanpint1args-2.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:positiveInteger(upper bound). |
| public void test_fn_booleanpint1args_3() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanpint1args-3.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanpint1args-3.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:unsignedLong(lower bound). |
| public void test_fn_booleanulng1args_1() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanulng1args-1.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanulng1args-1.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:unsignedLong(mid range). |
| public void test_fn_booleanulng1args_2() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanulng1args-2.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanulng1args-2.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:unsignedLong(upper bound). |
| public void test_fn_booleanulng1args_3() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanulng1args-3.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleanulng1args-3.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:nonPositiveInteger(lower bound). |
| public void test_fn_booleannpi1args_1() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleannpi1args-1.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleannpi1args-1.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:nonPositiveInteger(mid range). |
| public void test_fn_booleannpi1args_2() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleannpi1args-2.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleannpi1args-2.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:nonPositiveInteger(upper bound). |
| public void test_fn_booleannpi1args_3() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleannpi1args-3.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleannpi1args-3.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:nonNegativeInteger(lower bound). |
| public void test_fn_booleannni1args_1() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleannni1args-1.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleannni1args-1.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:nonNegativeInteger(mid range). |
| public void test_fn_booleannni1args_2() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleannni1args-2.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleannni1args-2.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:nonNegativeInteger(upper bound). |
| public void test_fn_booleannni1args_3() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleannni1args-3.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleannni1args-3.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:short(lower bound). |
| public void test_fn_booleansht1args_1() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleansht1args-1.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleansht1args-1.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:short(mid range). |
| public void test_fn_booleansht1args_2() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleansht1args-2.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleansht1args-2.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates the "boolean" function with the arguments set as follows: $arg = xs:short(upper bound). |
| public void test_fn_booleansht1args_3() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleansht1args-3.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-booleansht1args-3.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: empty sequence. |
| public void test_fn_boolean_mixed_args_001() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-001.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-001.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(())"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: string. |
| public void test_fn_boolean_mixed_args_002() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-002.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-002.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(\"\")"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: boolean function. |
| public void test_fn_boolean_mixed_args_003() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-003.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-003.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(false())"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: boolean function. |
| public void test_fn_boolean_mixed_args_004() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-004.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-004.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(true())"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: string. |
| public void test_fn_boolean_mixed_args_005() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-005.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-005.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:string(\"\"))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: string. |
| public void test_fn_boolean_mixed_args_006() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-006.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-006.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(('a'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: string. |
| public void test_fn_boolean_mixed_args_007() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-007.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-007.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:string('abc'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: integer. |
| public void test_fn_boolean_mixed_args_008() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-008.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-008.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(0)"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: integer. |
| public void test_fn_boolean_mixed_args_009() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-009.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-009.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(1)"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: integer. |
| public void test_fn_boolean_mixed_args_010() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-010.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-010.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(-1)"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: float. |
| public void test_fn_boolean_mixed_args_011() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-011.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-011.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:float('NaN'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: float. |
| public void test_fn_boolean_mixed_args_012() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-012.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-012.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:float('-INF'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: float. |
| public void test_fn_boolean_mixed_args_013() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-013.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-013.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:float('INF'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: float. |
| public void test_fn_boolean_mixed_args_014() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-014.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-014.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:float(0))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: float. |
| public void test_fn_boolean_mixed_args_015() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-015.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-015.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:float(1))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: float. |
| public void test_fn_boolean_mixed_args_016() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-016.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-016.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:float(-1))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: double. |
| public void test_fn_boolean_mixed_args_017() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-017.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-017.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:double('NaN'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: double. |
| public void test_fn_boolean_mixed_args_018() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-018.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-018.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:double('-INF'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: double. |
| public void test_fn_boolean_mixed_args_019() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-019.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-019.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:double('INF'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: double. |
| public void test_fn_boolean_mixed_args_020() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-020.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-020.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:double(0))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: double. |
| public void test_fn_boolean_mixed_args_021() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-021.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-021.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:double(1))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: double. |
| public void test_fn_boolean_mixed_args_022() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-022.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-022.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:double('1'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: double. |
| public void test_fn_boolean_mixed_args_023() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-023.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-023.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:double('NaN'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: decimal. |
| public void test_fn_boolean_mixed_args_024() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-024.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-024.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:decimal('9.99999999999999999999999999'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: decimal. |
| public void test_fn_boolean_mixed_args_025() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-025.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-025.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:decimal('-123456789.123456789123456789'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: decimal. |
| public void test_fn_boolean_mixed_args_026() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-026.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-026.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:decimal('0'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: decimal. |
| public void test_fn_boolean_mixed_args_027() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-027.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-027.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:decimal('1'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: decimal. |
| public void test_fn_boolean_mixed_args_028() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-028.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-028.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:decimal('-1'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: integer. |
| public void test_fn_boolean_mixed_args_029() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-029.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-029.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:integer('0'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: integer. |
| public void test_fn_boolean_mixed_args_030() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-030.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-030.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:integer('1'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: integer. |
| public void test_fn_boolean_mixed_args_031() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-031.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-031.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:integer('-1'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: nonPositiveInteger. |
| public void test_fn_boolean_mixed_args_032() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-032.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-032.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:nonPositiveInteger('-99999999999999999'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: nonPositiveInteger. |
| public void test_fn_boolean_mixed_args_033() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-033.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-033.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:nonPositiveInteger('0'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: nonPositiveInteger. |
| public void test_fn_boolean_mixed_args_034() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-034.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-034.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:nonPositiveInteger('-1'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: negativeInteger. |
| public void test_fn_boolean_mixed_args_035() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-035.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-035.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:negativeInteger('-99999999999999999'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: negativeInteger. |
| public void test_fn_boolean_mixed_args_036() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-036.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-036.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:negativeInteger('-1'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: positiveInteger. |
| public void test_fn_boolean_mixed_args_037() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-037.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-037.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:positiveInteger('99999999999999999'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: positiveInteger. |
| public void test_fn_boolean_mixed_args_038() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-038.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-038.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:positiveInteger('1'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: long. |
| public void test_fn_boolean_mixed_args_039() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-039.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-039.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:long('9223372036854775807'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: long. |
| public void test_fn_boolean_mixed_args_040() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-040.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-040.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:long('-9223372036854775808'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: long. |
| public void test_fn_boolean_mixed_args_041() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-041.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-041.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:long('0'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: long. |
| public void test_fn_boolean_mixed_args_042() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-042.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-042.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:long('1'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: long. |
| public void test_fn_boolean_mixed_args_043() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-043.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-043.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:long('-1'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: int. |
| public void test_fn_boolean_mixed_args_044() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-044.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-044.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:int('2147483647'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: int. |
| public void test_fn_boolean_mixed_args_045() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-045.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-045.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:int('-2147483648'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: int. |
| public void test_fn_boolean_mixed_args_046() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-046.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-046.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:int('0'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: int. |
| public void test_fn_boolean_mixed_args_047() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-047.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-047.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:int('1'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Arg: int. |
| public void test_fn_boolean_mixed_args_048() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-048.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-048.xml"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = "fn:boolean(xs:int('-1'))"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = "<return>" + buildResultString(rs) + "</return>"; |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates fn:boolean with argument set to an xs:anyURI. |
| public void test_fn_boolean_mixed_args_049() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-049.xq"; |
| String resultFile = "/ExpectedTestResults/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-mixed-args-049.txt"; |
| String expectedResult = getExpectedResult(resultFile); |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates fn:boolean with argument set to an xs:dateTime value. Should rise an error. |
| public void test_fn_boolean_050() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/fn-boolean-050.xq"; |
| String expectedResult = "FORG0006"; |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(domDoc); |
| |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| //Evaluates fn:boolean that uses a context item, which is not defined. |
| public void test_context_item_1() throws Exception { |
| String inputFile = "/TestSources/emptydoc.xml"; |
| String xqFile = "/Queries/XQuery/Functions/SeqFunc/GeneralSeqFunc/SeqBooleanFunc/context-item-1.xq"; |
| String expectedResult = "XPDY0002"; |
| URL fileURL = bundle.getEntry(inputFile); |
| loadDOMDocument(fileURL); |
| |
| // Get XML Schema Information for the Document |
| XSModel schema = getGrammar(); |
| |
| setupDynamicContext(schema); |
| |
| String xpath = extractXPathExpression(xqFile, inputFile); |
| xpath = "fn:boolean(.)"; |
| String actual = null; |
| try { |
| compileXPath(xpath); |
| ResultSequence rs = evaluate(null); // no context |
| |
| actual = buildResultString(rs); |
| |
| } catch (XPathParserException ex) { |
| actual = ex.code(); |
| } catch (StaticError ex) { |
| actual = ex.code(); |
| } catch (DynamicError ex) { |
| actual = ex.code(); |
| } |
| |
| assertEquals("XPath Result Error " + xqFile + ":", expectedResult, actual); |
| |
| |
| } |
| |
| } |
| |