@@ -18,74 +18,72 @@ namespace TAP {
18
18
// Return the variant of "Failed test" or "Failed
19
19
// (TODO) test" required by whether the current test is
20
20
// a todo test
21
- char const * failed_test_msg () throw() ;
21
+ char const * failed_test_msg () noexcept ;
22
22
}
23
23
class fatal_exception : public std ::exception {
24
24
std::string message;
25
25
public:
26
26
fatal_exception (const std::string& _message) : message(_message) {
27
27
}
28
- const char * what () const throw() {
28
+ const char * what () const noexcept {
29
29
return message.c_str ();
30
30
}
31
- ~fatal_exception () throw () {
32
- }
33
31
};
34
32
extern const details::skip_all_type skip_all;
35
33
extern const details::no_plan_type no_plan;
36
- void plan (unsigned ) throw(fatal_exception) ;
37
- void plan (const details::skip_all_type&, const std::string& = " " ) throw(fatal_exception) ;
38
- void plan (const details::no_plan_type&) throw() ;
39
- void done_testing () throw(fatal_exception) ;
40
- void done_testing (unsigned ) throw(fatal_exception) ;
34
+ void plan (unsigned );
35
+ void plan (const details::skip_all_type&, const std::string& = " " );
36
+ void plan (const details::no_plan_type&);
37
+ void done_testing ();
38
+ void done_testing (unsigned );
41
39
42
- unsigned planned () throw() ;
43
- unsigned encountered () throw() ;
40
+ unsigned planned ();
41
+ unsigned encountered ();
44
42
45
- bool ok (bool , const std::string& = " " ) throw() ;
46
- bool not_ok (bool , const std::string& = " " ) throw() ;
43
+ bool ok (bool , const std::string& = " " );
44
+ bool not_ok (bool , const std::string& = " " );
47
45
48
- bool pass (const std::string& = " " ) throw() ;
49
- bool fail (const std::string& = " " ) throw() ;
46
+ bool pass (const std::string& = " " );
47
+ bool fail (const std::string& = " " );
50
48
51
- void skip (unsigned , const std::string& = " " ) throw() ;
52
- void bail_out (const std::string& reason) throw() ;
49
+ void skip (unsigned , const std::string& = " " );
50
+ void bail_out (const std::string& reason);
53
51
54
- int exit_status () throw() ;
55
- bool summary () throw() ;
52
+ int exit_status ();
53
+ bool summary ();
56
54
57
- void set_output (std::ostream&) throw(fatal_exception) ;
58
- void set_error (std::ostream&) throw(fatal_exception) ;
55
+ void set_output (std::ostream&);
56
+ void set_error (std::ostream&);
59
57
60
- template <typename T> void diag (const T& first) throw() {
58
+ template <typename T> void diag (const T& first) {
61
59
*details::error << " # " << first << std::endl;
62
60
}
63
- template <typename T1, typename T2> void diag (const T1& first, const T2& second) throw() {
61
+ template <typename T1, typename T2> void diag (const T1& first, const T2& second) {
64
62
*details::error << " # " << first << second << std::endl;
65
63
}
66
- template <typename T1, typename T2, typename T3> void diag (const T1& first, const T2& second, const T3& third) throw() {
64
+ template <typename T1, typename T2, typename T3> void diag (const T1& first, const T2& second, const T3& third) {
67
65
*details::error << " # " << first << second << third << std::endl;
68
66
}
69
- template <typename T1, typename T2, typename T3, typename T4> void diag (const T1& first, const T2& second, const T3& third, const T4& fourth) throw() {
67
+ template <typename T1, typename T2, typename T3, typename T4> void diag (const T1& first, const T2& second, const T3& third, const T4& fourth) {
70
68
*details::error << " # " << first << second << third << fourth << std::endl;
71
69
}
72
- template <typename T1, typename T2, typename T3, typename T4, typename T5> void diag (const T1& first, const T2& second, const T3& third, const T4& fourth, const T5& fifth) throw() {
70
+ template <typename T1, typename T2, typename T3, typename T4, typename T5> void diag (const T1& first, const T2& second, const T3& third, const T4& fourth, const T5& fifth) {
73
71
*details::error << " # " << first << second << third << fourth << fifth << std::endl;
74
72
}
75
73
76
- template <typename T> void note (const T& first) throw() {
74
+ template <typename T> void note (const T& first) {
77
75
*details::output << " # " << first << std::endl;
78
76
}
79
- template <typename T1, typename T2> void note (const T1& first, const T2& second) throw() {
77
+ template <typename T1, typename T2> void note (const T1& first, const T2& second) {
80
78
*details::output << " # " << first << second << std::endl;
81
79
}
82
- template <typename T1, typename T2, typename T3> void note (const T1& first, const T2& second, const T3& third) throw() {
80
+ template <typename T1, typename T2, typename T3> void note (const T1& first, const T2& second, const T3& third) {
83
81
*details::output << " # " << first << second << third << std::endl;
84
82
}
85
- template <typename T1, typename T2, typename T3, typename T4> void note (const T1& first, const T2& second, const T3& third, const T4& fourth) throw() {
83
+ template <typename T1, typename T2, typename T3, typename T4> void note (const T1& first, const T2& second, const T3& third, const T4& fourth) {
86
84
*details::output << " # " << first << second << third << fourth << std::endl;
87
85
}
88
- template <typename T1, typename T2, typename T3, typename T4, typename T5> void note (const T1& first, const T2& second, const T3& third, const T4& fourth, const T5& fifth) throw() {
86
+ template <typename T1, typename T2, typename T3, typename T4, typename T5> void note (const T1& first, const T2& second, const T3& third, const T4& fourth, const T5& fifth) {
89
87
*details::output << " # " << first << second << third << fourth << fifth << std::endl;
90
88
}
91
89
@@ -172,8 +170,8 @@ namespace TAP {
172
170
class todo_guard {
173
171
const std::string value;
174
172
public:
175
- todo_guard () throw () ;
176
- ~todo_guard () throw () ;
173
+ todo_guard ();
174
+ ~todo_guard ();
177
175
};
178
176
}
179
177
@@ -183,22 +181,22 @@ namespace TAP {
183
181
namespace details {
184
182
struct Skip_exception {
185
183
const std::string reason;
186
- Skip_exception (const std::string& _reason) throw () : reason(_reason) {
184
+ Skip_exception (const std::string& _reason) : reason(_reason) {
187
185
}
188
186
};
189
187
struct Todo_exception {
190
188
const std::string reason;
191
- Todo_exception (const std::string& _reason) throw () : reason(_reason) {
189
+ Todo_exception (const std::string& _reason) : reason(_reason) {
192
190
}
193
191
};
194
192
195
- void start_block (unsigned ) throw() ;
196
- unsigned stop_block () throw(fatal_exception) ;
193
+ void start_block (unsigned );
194
+ unsigned stop_block ();
197
195
198
196
}
199
197
200
- void skip (const std::string& reason) throw(details::Skip_exception) ;
201
- void skip_todo (const std::string& reason) throw(details::Todo_exception) ;
198
+ void skip (const std::string& reason);
199
+ void skip_todo (const std::string& reason);
202
200
}
203
201
204
202
#define TRY (action, name ) do {\
0 commit comments