From 81cc473cef1bb24a87382b93802cfc6e31eeb3c6 Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Fri, 10 Apr 2015 11:28:16 +0200 Subject: Skip op-numeric-unary-minus-1 testcase because it crashes. It seems to require a larger refactoring in order to solve this, so we skip this for now in order for us to be able to run the remaining tests in CI. Change-Id: I2ae4860a92cdb7fb88ca89c4dd1f047bacbaaf9e Reviewed-by: Simon Hausmann --- src/xmlpatterns/expr/qunaryexpression.cpp | 5 ++++- tests/auto/xmlpatternssdk/TestCase.cpp | 6 ++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/xmlpatterns/expr/qunaryexpression.cpp b/src/xmlpatterns/expr/qunaryexpression.cpp index 1c4524e..f99096b 100644 --- a/src/xmlpatterns/expr/qunaryexpression.cpp +++ b/src/xmlpatterns/expr/qunaryexpression.cpp @@ -59,7 +59,10 @@ Item UnaryExpression::evaluateSingleton(const DynamicContext::Ptr &context) cons { const Item item(m_operand2->evaluateSingleton(context)); - if(item) + if (item) + // If the item is an untypedAtomic (or atomicString), the cast to Numeric will + // return a garbage object and will most likely cause a crash. + // There is simply no way to static cast from an instance of AtomicString to a Number. return item.as()->toNegated(); else return Item(); diff --git a/tests/auto/xmlpatternssdk/TestCase.cpp b/tests/auto/xmlpatternssdk/TestCase.cpp index a81cba9..bf8616c 100644 --- a/tests/auto/xmlpatternssdk/TestCase.cpp +++ b/tests/auto/xmlpatternssdk/TestCase.cpp @@ -77,6 +77,12 @@ TestResult::List TestCase::execute(const ExecutionStage stage, result.append(createTestResult(TestResult::Fail, QLatin1String("Skipped this test, we crash on it."))); return result; } + else if (name() == QLatin1String("op-numeric-unary-minus-1")) + { + TestResult::List result; + result.append(createTestResult(TestResult::Fail, QLatin1String("Skipped this test, we crash on it."))); + return result; + } qDebug() << "Running test case: " << name(); -- cgit v1.2.1 From 8d5f3bd730486b3fd3d5b1782fa70b80108c0ba4 Mon Sep 17 00:00:00 2001 From: Jan Arve Saether Date: Fri, 10 Apr 2015 13:16:12 +0200 Subject: Skipped some tests that crashed These tests crashed, and thus prevented us from getting the results from the ~19000 other test cases. Change-Id: I8fd2abcc68b545177f4baa912e9e0d5dbe931201 Reviewed-by: Simon Hausmann --- tests/auto/xmlpatternssdk/TestCase.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/auto/xmlpatternssdk/TestCase.cpp b/tests/auto/xmlpatternssdk/TestCase.cpp index bf8616c..d84ac06 100644 --- a/tests/auto/xmlpatternssdk/TestCase.cpp +++ b/tests/auto/xmlpatternssdk/TestCase.cpp @@ -83,6 +83,18 @@ TestResult::List TestCase::execute(const ExecutionStage stage, result.append(createTestResult(TestResult::Fail, QLatin1String("Skipped this test, we crash on it."))); return result; } + else if (name() == QLatin1String("emptyorderdecl-13")) + { + TestResult::List result; + result.append(createTestResult(TestResult::Fail, QLatin1String("Skipped this test, we crash on it."))); + return result; + } + else if (name() == QLatin1String("emptyorderdecl-21")) + { + TestResult::List result; + result.append(createTestResult(TestResult::Fail, QLatin1String("Skipped this test, we crash on it."))); + return result; + } qDebug() << "Running test case: " << name(); -- cgit v1.2.1