ICE 3.4.2
[php5-ice-freebsdport.git] / cpp / test / IceUtil / priority / TestBase.cpp
blob658ffebbf265fe601efc07dec86eab8b601ae885
1 // **********************************************************************
2 //
3 // Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
4 //
5 // This copy of Ice is licensed to you under the terms described in the
6 // ICE_LICENSE file included in this distribution.
7 //
8 // **********************************************************************
10 #include <IceUtil/IceUtil.h>
12 #include <TestBase.h>
14 using namespace std;
16 TestFailed::TestFailed(const std::string& n) :
17 name(n)
21 TestBase::TestBase(const std::string& n) :
22 _name(n)
26 string
27 TestBase::name() const
29 return _name;
32 void
33 TestBase::start()
35 cout << "running " << _name << " test... " << flush;
36 try
38 run();
40 catch(const IceUtil::Exception& e)
42 cout << e << " failed" << endl;
43 throw TestFailed(_name);
45 cout << "ok" << endl;