phonebookengines/contactsmodel/documentation/Building_contacts_tests.txt
branchRCL_3
changeset 9 0d28c1c5b6dd
parent 8 5586b4d2ec3e
child 11 2828b4d142c0
equal deleted inserted replaced
8:5586b4d2ec3e 9:0d28c1c5b6dd
     1 =====================================
       
     2 Contacts model test harness resources
       
     3 =====================================
       
     4 Some of the contacts model tests require that a specific contacts model resource file is used.  This resource file is located in \app-engines\cntmodel\group\cntmodel.rss. The main difference from the default resource, provided by Contacts application is the presence of 2 fields with EContactFieldFlagFilterable flag set. 
       
     5 
       
     6 Because the resource file is not owned by us, we provide a testing-only version of the cntmodel.rss. And it is only built for test builds (abld test build). The test version of cntmodel.rss in included in cnttutil test library,  which is used by most of the contacts test harnesses including T_Custfilter.exe.
       
     7 
       
     8 Cntmodel.rss defines two new fields for custom filtering, and three new fields for pronunciation.  If these fields are missing from the compiled cntmodel resources (eg \epoc32\release\winscw\udeb\z\resource\cntmodel\cntmodel.rsc) then you will see error messages such as:
       
     9  
       
    10 ====================================
       
    11 ..\TSRC\T_custfilter.cpp(281) : runtime error: Statement 'iCustom1View->CountL()
       
    12  == iTestConductor->iAcceptCount + iTestConductor->iAskCount' equals 0
       
    13 
       
    14 ..\TSRC\T_custfilter.cpp(299) : runtime error: Statement 'iTestConductor->iAcceptCount == 0' equals 0
       
    15 
       
    16 ..\TSRC\T_custfilter.cpp(301) : runtime error: Statement 'iTestConductor->iAskCount == 0' equals 0
       
    17 ==== Exercise Nickname View
       
    18 
       
    19 ..\TSRC\T_custfilter.cpp(308) : runtime error: Statement 'iCustom2View->CountL() == KNickname' equals 0
       
    20 ==== Filter View Finished
       
    21 **  Total amount of time taken [0s0us]  **
       
    22 : FAIL : T_CustFilter failed check 2 at line Number: 444
       
    23 RTEST: Checkpoint-fail
       
    24 ====================================
       
    25 
       
    26 The solution is to make sure that you build the contact resources from \group\cntmodel.rss by building cnttutil, or to add these fields into the existing cntmodel.rss file and rebuild the resources.
       
    27  
       
    28 To make sure that you're using the proper version of the resource file go to \epoc32\release\winscw\udeb\z\resource\cntmodel\ directory (armv5 and/or urel for other configurations) and delete cntmodel.rsc manually.  "abld test reallyclean" may do it for you, but if often fails. Then build all the contacts model test code and check that the cntmodel.rsc was created after that.