qcpix/tsrc/qtcpixunittests/src/ut_qtcpixdocumentfield.cpp
changeset 24 65456528cac2
parent 13 fcb2a58c181b
equal deleted inserted replaced
23:d4d56f5e7c55 24:65456528cac2
    71     QVERIFY( iField->config() == config );
    71     QVERIFY( iField->config() == config );
    72     }
    72     }
    73 
    73 
    74 void CpixDocumentFieldTester::init()
    74 void CpixDocumentFieldTester::init()
    75     {
    75     {
       
    76     //test for getting value of a field in the form of list of strings.
       
    77     iField = CpixDocumentField::newInstance( "testName", "one two three", 100 );
       
    78     QStringList list = iField->values();
       
    79     QString str[3] = {"one", "two", "three"};
       
    80     QStringList::iterator i = list.begin();
       
    81      for(int j = 0;i !=list.end(); ++i, j++)
       
    82          QVERIFY( iField!=NULL && iField->name()=="testName" && *i==str[j] && iField->config()==100 );
       
    83      
       
    84      
    76     iField = CpixDocumentField::newInstance( "testName", "testValue", 100 );
    85     iField = CpixDocumentField::newInstance( "testName", "testValue", 100 );
    77     QVERIFY( iField!=NULL && iField->name()=="testName" && iField->value()=="testValue" && iField->config()==100 );
    86     QVERIFY( iField!=NULL && iField->name()=="testName" && iField->value()=="testValue" && iField->config()==100 );
    78     }
    87     }
    79 
    88 
    80 void CpixDocumentFieldTester::cleanup()
    89 void CpixDocumentFieldTester::cleanup()