MCPcopy Create free account
hub / github.com/cutelyst/cutelyst / testValidatorRequiredWithoutAll_data

Method testValidatorRequiredWithoutAll_data

tests/testvalidator.cpp:3756–3789  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3754}
3755
3756void TestValidator::testValidatorRequiredWithoutAll_data()
3757{
3758 QTest::addColumn<QString>("url");
3759 QTest::addColumn<QByteArray>("body");
3760 QTest::addColumn<QByteArray>("output");
3761
3762 // **** Start testing ValidatorRequiredWithoutAll *****
3763
3764 QUrlQuery query;
3765 query.addQueryItem(u"field"_s, u"wlklasdf"_s);
3766 query.addQueryItem(u"field2"_s, u"wlklasdf"_s);
3767 QTest::newRow("valid00") << u"/requiredWithoutAll"_s
3768 << query.toString(QUrl::FullyEncoded).toLatin1() << valid;
3769
3770 query.clear();
3771 query.addQueryItem(u"field"_s, u"wlklasdf"_s);
3772 QTest::newRow("valid01") << u"/requiredWithoutAll"_s
3773 << query.toString(QUrl::FullyEncoded).toLatin1() << valid;
3774
3775 query.clear();
3776 query.addQueryItem(u"field"_s, u"wlklasdf"_s);
3777 query.addQueryItem(u"field4"_s, u"wlklasdf"_s);
3778 QTest::newRow("valid02") << u"/requiredWithoutAll"_s
3779 << query.toString(QUrl::FullyEncoded).toLatin1() << valid;
3780
3781 query.clear();
3782 QTest::newRow("invalid00") << u"/requiredWithoutAll"_s
3783 << query.toString(QUrl::FullyEncoded).toLatin1() << invalid;
3784
3785 query.clear();
3786 query.addQueryItem(u"field4"_s, u"wlklasdf"_s);
3787 QTest::newRow("invalid01") << u"/requiredWithoutAll"_s
3788 << query.toString(QUrl::FullyEncoded).toLatin1() << invalid;
3789}
3790
3791void TestValidator::testValidatorSame_data()
3792{

Callers

nothing calls this directly

Calls 1

clearMethod · 0.80

Tested by

no test coverage detected