zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #26023
[Merge] lp:~zorba-coders/zorba/threads into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/threads into lp:zorba.
Commit message:
fixed a failing PathExpr test in XQTS
Requested reviews:
Markos Zaharioudakis (markos-za)
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/threads/+merge/188554
fixed a failing PathExpr test in XQTS
--
https://code.launchpad.net/~zorba-coders/zorba/threads/+merge/188554
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/compiler/expression/expr_type.cpp'
--- src/compiler/expression/expr_type.cpp 2013-09-23 09:11:02 +0000
+++ src/compiler/expression/expr_type.cpp 2013-10-01 11:12:39 +0000
@@ -319,6 +319,9 @@
stepType = axis_step_type(theSctx,
axisStep,
static_cast<const NodeXQType*>(stepType.getp()));
+
+ if (stepType->is_empty() || stepType->is_none())
+ break;
}
newType = stepType.getp();
@@ -1141,6 +1144,10 @@
case store::StoreConsts::commentNode:
return RTM.COMMENT_TYPE_STAR;
+ case store::StoreConsts::attributeNode:
+ case store::StoreConsts::documentNode:
+ return RTM.EMPTY_TYPE;
+
default:
ZORBA_ASSERT(false);
}
=== modified file 'test/driver/testdriver_comparator.cpp'
--- test/driver/testdriver_comparator.cpp 2013-05-16 08:22:46 +0000
+++ test/driver/testdriver_comparator.cpp 2013-10-01 11:12:39 +0000
@@ -34,7 +34,8 @@
/*******************************************************************************
********************************************************************************/
-int canonicalizeAndCompare(const std::string& aComparisonMethod,
+int canonicalizeAndCompare(
+ const std::string& aComparisonMethod,
const char* aRefFile,
const char* aResultFile,
std::ostream& aOutput)
@@ -224,7 +225,7 @@
zorba::printFile(aOutput, lCanonicalRefFile);
aOutput << std::endl << std::endl;
-
+#if 0
aOutput << "See line " << lLine << ", col " << lCol
<< " of expected result. " << std::endl;
aOutput << "Actual: <";
@@ -235,7 +236,7 @@
aOutput << lRefLine;
aOutput << ">" << std::endl;
-
+#endif
return 8;
}
return 0;
=== modified file 'test/driver/testdriver_mt.cpp'
--- test/driver/testdriver_mt.cpp 2013-09-26 07:38:44 +0000
+++ test/driver/testdriver_mt.cpp 2013-10-01 11:12:39 +0000
@@ -364,6 +364,7 @@
}
else
{
+#if 0
printErrors(errHandler, "Unexpected errors executing query", true, lOutput);
std::ofstream errFile(errHandler.getErrorFile().c_str());
@@ -375,6 +376,7 @@
errFile << " " << *lIter;
}
errFile << std::endl;
+#endif
return false;
}
}
@@ -539,16 +541,23 @@
// in the pathname of the result and error files.
resultFilePath = fs::path(queries->theResultsDir) / (relativeQueryFile);
resultFilePath = fs::change_extension(resultFilePath, (".res_" + tnoStr));
+
+ if (fs::exists(resultFilePath))
+ fs::remove(resultFilePath);
+
+ std::ofstream resFileStream;
+ createPath(resultFilePath, resFileStream);
+
+#if 0
errorFilePath = fs::path(queries->theResultsDir) / (relativeQueryFile);
errorFilePath = fs::change_extension(errorFilePath, (".err_" + tnoStr));
- if (fs::exists(resultFilePath)) fs::remove(resultFilePath);
- if (fs::exists(errorFilePath)) fs::remove(errorFilePath);
+ if (fs::exists(errorFilePath))
+ fs::remove(errorFilePath);
- std::ofstream resFileStream;
std::ofstream errFileStream;
- createPath(resultFilePath, resFileStream);
createPath(errorFilePath, errFileStream);
+#endif
queries->theQueryLocks[queryNo]->unlock();
@@ -615,8 +624,6 @@
//
zorba::XQuery_t query = zorba->createQuery(&errHandler);
- query->registerDiagnosticHandler(&errHandler);
-
//
// Compile the query
//
=== modified file 'test/rbkt/Queries/w3c_known_failures.txt'
--- test/rbkt/Queries/w3c_known_failures.txt 2013-07-02 09:58:23 +0000
+++ test/rbkt/Queries/w3c_known_failures.txt 2013-10-01 11:12:39 +0000
@@ -52,7 +52,6 @@
test/rbkt/w3c_testsuite/XQuery/Functions/HigherOrder/Map/map-005
test/rbkt/w3c_testsuite/XQuery/Functions/HigherOrder/Map/map-007
test/rbkt/w3c_testsuite/XQuery/Functions/HigherOrder/Map/map-003
-test/rbkt/w3c_testsuite/XQuery/PathExpr/Steps/Axes/K2-Axes-86
test/rbkt/w3c_testsuite/XQuery/PathExpr/Steps/Axes/K2-Axes-52
test/rbkt/w3c_testsuite/XQuery/StaticTyping/STFunctions/ST-Data001
test/rbkt/w3c_testsuite/XQuery/StaticTyping/STFLWORExpr/ST-PITest-02
References