~ubuntu-branches/ubuntu/wily/cxxtools/wily-proposed

« back to all changes in this revision

Viewing changes to src/unit/testsuite.cpp

  • Committer: Package Import Robot
  • Author(s): Kari Pahula
  • Date: 2012-04-28 10:30:29 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20120428103029-qc8v0sb4yb8h1542
Tags: 2.1-1
* New upstream release (SONAME 8)
  - Removed patch gcc4.7_ftbfs_fix since upstream source is GCC 4.7 safe.
  - Patches iconvstream_size_t_fix, configure.in_fixes and
    arm_gcc4.6_ftbfs_fix removed since they have been implemented in
    upstream source.
* Standards-Version 3.9.3.
* Use dh-autoreconf.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
 
45
45
TestSuite::~TestSuite()
46
46
{
47
 
    std::multimap<std::string, TestMethod*>::iterator it;
 
47
    Tests::iterator it;
48
48
    for(it = _tests.begin(); it != _tests.end(); ++it)
49
49
    {
50
50
        delete it->second;
93
93
void TestSuite::runAll()
94
94
{
95
95
    const SerializationInfo* si = 0;
96
 
    std::multimap<std::string, TestMethod*>::iterator it;
 
96
    Tests::iterator it;
97
97
    for(it = _tests.begin(); it != _tests.end(); ++it)
98
98
    {
99
99
        TestMethod* test = it->second;
105
105
 
106
106
TestMethod* TestSuite::findTest(const std::string& name)
107
107
{
108
 
    std::multimap<std::string, TestMethod*>::iterator it = _tests.find(name);
 
108
    Tests::iterator it;
 
109
    for (it = _tests.begin(); it != _tests.end() && it->first != name; ++it)
 
110
        ;
 
111
 
109
112
    if( it== _tests.end() )
110
113
        return 0;
111
114
 
117
120
{
118
121
    test->setParent(this);
119
122
    std::pair<const std::string, TestMethod*> p( test->name(), test );
120
 
    _tests.insert( p );
 
123
    _tests.push_back( p );
121
124
}
122
125
 
123
126