Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:lemmy04
libtut
libtut-2008-11-30.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File libtut-2008-11-30.diff of Package libtut
diff -r 12b2ceb31753 tut/tut_assert.hpp --- a/tut/tut_assert.hpp Tue Jul 21 15:09:02 2009 -0700 +++ b/tut/tut_assert.hpp Tue Jul 21 15:37:32 2009 -0700 @@ -154,9 +154,23 @@ throw failure(msg); } +/** + * Skip test because of known failure. + */ +void skip(const char* msg = "") +{ + throw skip_failure(msg); +} + +void skip(const std::string& msg) +{ + throw skip_failure(msg); +} + } // end of namespace } + #endif diff -r 12b2ceb31753 tut/tut_exception.hpp --- a/tut/tut_exception.hpp Tue Jul 21 15:09:02 2009 -0700 +++ b/tut/tut_exception.hpp Tue Jul 21 15:37:32 2009 -0700 @@ -201,6 +201,26 @@ const test_result tr; }; +/** + * Exception to be throwed when skip_fail() is called. + */ +struct skip_failure : public failure +{ + skip_failure(const std::string& msg) + : failure(msg) + { + } + + test_result::result_type result() const + { + return test_result::skip; + } + + ~skip_failure() throw() + { + } +}; + } #endif diff -r 12b2ceb31753 tut/tut_posix.hpp --- a/tut/tut_posix.hpp Tue Jul 21 15:09:02 2009 -0700 +++ b/tut/tut_posix.hpp Tue Jul 21 15:37:32 2009 -0700 @@ -248,13 +248,13 @@ return; } else - { - std::stringstream ss; + { + std::stringstream ss; char e[1024]; ss << "child " << pid << " could not be killed with SIGKILL, " << strerror_r(errno, e, sizeof(e)) << std::endl; - fail(ss.str()); + fail(ss.str()); + } } - } ensure_equals("wait after SIGKILL", waitpid_(pid, &status), pid); ensure_child_signal_(status, SIGKILL); diff -r 12b2ceb31753 tut/tut_result.hpp --- a/tut/tut_result.hpp Tue Jul 21 15:09:02 2009 -0700 +++ b/tut/tut_result.hpp Tue Jul 21 15:37:32 2009 -0700 @@ -51,6 +51,7 @@ * ex - test throwed an exceptions * warn - test finished successfully, but test destructor throwed * term - test forced test application to terminate abnormally + * skip - test skpped because it is a known failure case */ enum result_type { @@ -60,7 +61,8 @@ warn, term, ex_ctor, - rethrown + rethrown, + skip, }; result_type result;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor