| 1649 | } |
| 1650 | |
| 1651 | void TestValidator::testValidatorBoolean_data() |
| 1652 | { |
| 1653 | QTest::addColumn<QString>("url"); |
| 1654 | QTest::addColumn<QByteArray>("body"); |
| 1655 | QTest::addColumn<QByteArray>("output"); |
| 1656 | |
| 1657 | // **** Start testing ValidatorBoolean ***** |
| 1658 | |
| 1659 | for (const QString &bv : {u"1"_s, u"0"_s, u"true"_s, u"false"_s, u"on"_s, u"off"_s}) { |
| 1660 | QTest::newRow(u"valid-%1"_s.arg(bv).toUtf8().constData()) |
| 1661 | << u"/boolean?boolean_field="_s + bv << QByteArray() << valid; |
| 1662 | } |
| 1663 | |
| 1664 | for (const QString &bv : {u"2"_s, u"-45"_s, u"wahr"_s, u"unwahr"_s, u"ja"_s}) { |
| 1665 | QTest::newRow(u"invalid-%1"_s.arg(bv).toUtf8().constData()) |
| 1666 | << u"/boolean?boolean_field="_s + bv << QByteArray() << invalid; |
| 1667 | } |
| 1668 | |
| 1669 | QTest::newRow("empty") << u"/boolean?boolean_field="_s << QByteArray() << valid; |
| 1670 | } |
| 1671 | |
| 1672 | void TestValidator::testValidatorCharNotAllowed_data() |
| 1673 | { |
nothing calls this directly
no outgoing calls
no test coverage detected