コード例 #1
0
ファイル: test_enum.cpp プロジェクト: REC-SPb-ETU/KDSoap
void TestEnum::test()
{
    // bunch of tests to prove numbers are well handled
    TNS__AudienceRating ar;
    ar.setType(TNS__AudienceRating::_12);
    ar.setType(TNS__AudienceRating::_6);
    ar.setType(TNS__AudienceRating::_18);
    ar.setType(TNS__AudienceRating::_16);
    ar.setType(TNS__AudienceRating::Http___f_q_d_n_ext_enum2);
    ar.setType(TNS__AudienceRating::_6Bis);

    QVariant var = ar.serialize();
    ar.deserialize(var);

    QCOMPARE(ar.type(), TNS__AudienceRating::_6Bis);
}
コード例 #2
0
ファイル: test_enum.cpp プロジェクト: KDAB/KDSoap
void TestEnum::test()
{
    // bunch of tests to prove numbers are well handled
    TNS__AudienceRating ar;
    ar.setType(TNS__AudienceRating::_12);
    ar.setType(TNS__AudienceRating::_6);
    ar.setType(TNS__AudienceRating::_18);
    ar.setType(TNS__AudienceRating::_16);
    ar.setType(TNS__AudienceRating::Http___f_q_d_n_ext_enum2);
    ar.setType(TNS__AudienceRating::_6Bis);

    KDSoapValue soapValue = ar.serialize(QString());
    ar.deserialize(soapValue);

    QCOMPARE(ar.type(), TNS__AudienceRating::_6Bis);
}