summaryrefslogtreecommitdiffstats
path: root/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp
diff options
context:
space:
mode:
authorJuha Kukkonen <juha.kukkonen@nokia.com>2011-10-10 05:36:14 (GMT)
committerJuha Kukkonen <juha.kukkonen@nokia.com>2011-10-10 07:15:23 (GMT)
commit22d475e1ef32875c4933b2bb4c2830cb1bdd3266 (patch)
tree7959bcba424f1108481e26341c4e9e35e12e152d /tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp
parent7e662f3727e7c3dd3c41c29ed49bc41d2b66c744 (diff)
downloadQt-22d475e1ef32875c4933b2bb4c2830cb1bdd3266.zip
Qt-22d475e1ef32875c4933b2bb4c2830cb1bdd3266.tar.gz
Qt-22d475e1ef32875c4933b2bb4c2830cb1bdd3266.tar.bz2
Fix XML schema validation failure.
Checking constraining facets for double failed if enumeration restriction had values INF or NaN. There were two issues that caused validation to fail: - wrong conversion function was used when constraining facets for double are checked, which caused values to be in lower case - case when both restriction and default value are NaN was not handled correctly Task-number: QTBUG-21375 Reviewed-by: Honglei Zhang
Diffstat (limited to 'tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp')
-rw-r--r--tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp b/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp
index 817ea1a..60c1fe8 100644
--- a/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp
+++ b/tests/auto/xmlpatternsvalidator/tst_xmlpatternsvalidator.cpp
@@ -222,6 +222,11 @@ void tst_XmlPatternsValidator::xsdSupport_data() const
<< (QStringList() << QLatin1String("files/dateTime-with-microseconds.xml")
<< QLatin1String("files/dateTime-with-microseconds.xsd"))
<< QString();
+
+ QTest::newRow("QTBUG-21375 A schema with a xs:double based simple type with non-numeric restrictions")
+ << 0
+ << (QStringList() << QLatin1String("files/schema-with-restrictions.xsd"))
+ << QString();
}
QTEST_MAIN(tst_XmlPatternsValidator)