You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by pr...@apache.org on 2015/04/01 20:35:11 UTC
[10/12] vxquery git commit: Fixed a few bugs with documentation and
bad arguments.
Fixed a few bugs with documentation and bad arguments.
Project: http://git-wip-us.apache.org/repos/asf/vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/vxquery/commit/054369a6
Tree: http://git-wip-us.apache.org/repos/asf/vxquery/tree/054369a6
Diff: http://git-wip-us.apache.org/repos/asf/vxquery/diff/054369a6
Branch: refs/heads/prestonc/xmark
Commit: 054369a634bdbad59980dc6a3a0bb41a1ae9209d
Parents: 90ee8b8
Author: Eldon Carman <ec...@ucr.edu>
Authored: Fri Mar 27 13:24:41 2015 -0700
Committer: Eldon Carman <ec...@ucr.edu>
Committed: Wed Apr 1 11:34:54 2015 -0700
----------------------------------------------------------------------
src/site/apt/user_running_tests.apt | 10 +++++-----
.../runtime/functions/cast/CastToStringOperation.java | 1 +
.../apache/vxquery/xtest/AbstractTestCaseFactory.java | 12 ++++++++----
3 files changed, 14 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/vxquery/blob/054369a6/src/site/apt/user_running_tests.apt
----------------------------------------------------------------------
diff --git a/src/site/apt/user_running_tests.apt b/src/site/apt/user_running_tests.apt
index d10bd7e..d5e97b2 100644
--- a/src/site/apt/user_running_tests.apt
+++ b/src/site/apt/user_running_tests.apt
@@ -72,11 +72,11 @@ sh ./vxquery-xtest/target/appassembler/bin/xtest -catalog vxquery-xtest/src/test
To run the complete XQTS on VXQuery.
* Create a folder to hold the XQTS.
- If you use "vxquery-xtest/test-suite/xqts", then maven will utilize the XQTS to verify VXQuery's passing functions during the build process.
+ If you use "vxquery-xtest/test-suites/xqts", then maven will utilize the XQTS to verify VXQuery's passing functions during the build process.
----------------------------------------
-$ mkdir -p vxquery-xtest/test-suite
-$ cd vxquery-xtest/test-suite
+$ mkdir -p vxquery-xtest/test-suites
+$ cd vxquery-xtest/test-suites
----------------------------------------
* Get the archive {{{http://dev.w3.org/2006/xquery-test-suite/PublicPagesStagingArea/XQTS_1_0_3.zip}XQTS_1_0_3.zip}} (e.g. using wget),
@@ -103,7 +103,7 @@ $ cd ../..
* run the tests, and
----------------------------------------
-sh ./vxquery-xtest/target/appassembler/bin/xtest -catalog vxquery-xtest/test-suite/xqts/XQTSCatalog.xml -htmlreport /tmp/full_report.html
+sh ./vxquery-xtest/target/appassembler/bin/xtest -catalog vxquery-xtest/test-suites/xqts/XQTSCatalog.xml -htmlreport /tmp/full_report.html
----------------------------------------
* view the results at {{{file:///tmp/full_report.html}file:///tmp/full_report.html}}.
@@ -118,7 +118,7 @@ sh ./vxquery-xtest/target/appassembler/bin/xtest -catalog vxquery-xtest/test-sui
* run the tests, and
----------------------------------------
-sh ./vxquery-xtest/target/appassembler/bin/xtest -catalog vxquery-xtest/test-suite/xqts/XQTSCatalog.xml -htmlreport /tmp/previous_report.html -previous-test-results vxquery-xtest/results/xqts.txt
+sh ./vxquery-xtest/target/appassembler/bin/xtest -catalog vxquery-xtest/test-suites/xqts/XQTSCatalog.xml -htmlreport /tmp/previous_report.html -previous-test-results vxquery-xtest/results/xqts.txt
----------------------------------------
* view the results at {{{file:///tmp/previous_report.html}file:///tmp/previous_report.html}}.
http://git-wip-us.apache.org/repos/asf/vxquery/blob/054369a6/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToStringOperation.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToStringOperation.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToStringOperation.java
index 90c6218..3cbcd5b 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToStringOperation.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/cast/CastToStringOperation.java
@@ -69,6 +69,7 @@ public class CastToStringOperation extends AbstractCastToOperation {
@Override
public void convertBase64Binary(XSBinaryPointable binaryp, DataOutput dOut) throws SystemException, IOException {
baaos.reset();
+ @SuppressWarnings("resource")
Base64OutputStream b64os = new Base64OutputStream(baaos, true);
b64os.write(binaryp.getByteArray(), binaryp.getStartOffset() + 2, binaryp.getLength() - 2);
http://git-wip-us.apache.org/repos/asf/vxquery/blob/054369a6/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/AbstractTestCaseFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/AbstractTestCaseFactory.java b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/AbstractTestCaseFactory.java
index 31e45d7..5bcfd6b 100644
--- a/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/AbstractTestCaseFactory.java
+++ b/vxquery-xtest/src/main/java/org/apache/vxquery/xtest/AbstractTestCaseFactory.java
@@ -117,9 +117,13 @@ public abstract class AbstractTestCaseFactory {
+ new File(url.getFile()).getCanonicalPath().substring(currPathLen));
}
});
- FileReader characterStream = new FileReader(catalog);
- parser.parse(new InputSource(characterStream));
- characterStream.close();
+ try {
+ FileReader characterStream = new FileReader(catalog);
+ parser.parse(new InputSource(characterStream));
+ characterStream.close();
+ } catch (FileNotFoundException e) {
+ System.err.println("Test Catalog has not been found: " + catalog.getAbsolutePath());
+ }
return count;
}
@@ -131,7 +135,7 @@ public abstract class AbstractTestCaseFactory {
}
return toSubmit;
}
-
+
protected abstract void submit(TestCase tc);
protected class Handler implements ContentHandler {