Changeset 205:05a60bb012d3 in verona


Ignore:
Timestamp:
May 25, 2011 11:13:42 AM (2 years ago)
Author:
Vadim Lebedev <vadim@…>
Branch:
default
Message:

avoid static object construction in phtests

Location:
phtest
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • phtest/phtests_core.cpp

    r150 r205  
    208208}; 
    209209 
    210 myphapi testsphapi; 
     210myphapi *testsphapip; 
    211211 
    212212struct testsFunc 
     
    226226        funcTab = new testsFunc*[nbFunc]; 
    227227        memset(funcTab, 0, nbFunc); 
     228        testsphapip = new myphapi; 
    228229} 
    229230 
    230231phTestsCore::~phTestsCore() 
    231232{ 
     233        delete testsphapip; 
     234 
    232235        for (int i = 0; i < nbFunc && funcTab[i]; ++i) 
    233236                delete funcTab[i]; 
     
    298301 
    299302        DBG_LOG("begin loop"); 
    300         testsphapi.conf(conf); 
     303        testsphapip->conf(conf); 
    301304        //test nbloop == -1 for infinite loop 
    302305        //test (res || !conf->haltonerror) for halting if func return false 
     
    315318        return res; 
    316319} 
     320#if 0 
    317321#include <sstream> 
    318322std::ostringstream funcPath; 
     
    322326void phTestsCore::addToPath(int choosenFunc, int res) { funcPath << choosenFunc << "#" << res << ";";  } 
    323327 
     328#else 
     329void phTestsCore::dumpPath() { } 
     330 
     331void phTestsCore::addToPath(int choosenFunc, int res) {   } 
     332 
     333 
     334 
     335 
     336#endif 
  • phtest/phtests_priv.h

    r131 r205  
    3333        void onCallProgress(int cid, const phCallStateInfo_t *info); 
    3434}; 
    35 extern myphapi testsphapi; 
     35extern myphapi *testsphapip; 
     36#define testsphapi (*testsphapip) 
     37 
    3638 
    3739#endif /*! TESTS_PRIV_H*/ 
Note: See TracChangeset for help on using the changeset viewer.