Blame tests/upstream-test-suite/026_exception.cpp
|
Than Ngo |
b7bcaa |
// objective: test the \exception, \param, and \tparam commands
|
|
Than Ngo |
b7bcaa |
// check: class_test.xml
|
|
Than Ngo |
b7bcaa |
|
|
Than Ngo |
b7bcaa |
/** A Test class.
|
|
Than Ngo |
b7bcaa |
* More details about this class.
|
|
Than Ngo |
b7bcaa |
* @tparam T A template parameter.
|
|
Than Ngo |
b7bcaa |
*/
|
|
Than Ngo |
b7bcaa |
template<class T> class Test
|
|
Than Ngo |
b7bcaa |
{
|
|
Than Ngo |
b7bcaa |
public:
|
|
Than Ngo |
b7bcaa |
/** An example member function.
|
|
Than Ngo |
b7bcaa |
* \param p1 First parameter.
|
|
Than Ngo |
b7bcaa |
* \param p2 Second parameter.
|
|
Than Ngo |
b7bcaa |
* \exception std::out_of_range parameter is out of range.
|
|
Than Ngo |
b7bcaa |
* \retval 0 if p1 and p2 are equal
|
|
Than Ngo |
b7bcaa |
* \retval -1 if p1 is smaller than p2
|
|
Than Ngo |
b7bcaa |
* \retval 1 if p1 is bigger than p2
|
|
Than Ngo |
b7bcaa |
*/
|
|
Than Ngo |
b7bcaa |
int example(int p1,int p2) throw(std::out_of_range);
|
|
Than Ngo |
b7bcaa |
};
|
|
Than Ngo |
b7bcaa |
|