[parted-devel] [PATCH 5/8] [tests] Add _test_exception_handler to fail every time an exception is raised

Otavio Salvador otavio at ossystems.com.br
Fri Apr 20 13:12:38 UTC 2007


Sometimes parts of code raises exceptions and this shouldn't happen on
tests. To ensure we catch them a specific exception handler has been
implemented.

The handler usage is very easy. You just need to put the following
code at testsuite main method:

...
        /* Fail when an exception is raised */
        ped_exception_set_handler (_test_exception_handler);
...

Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
(cherry picked from commit cba3a64fb1744f545c373594c8795a4da30558c4)

 libparted/tests/common.c |   10 ++++++++++
 libparted/tests/common.h |    6 ++++++
 libparted/tests/label.c  |    3 +++
 3 files changed, 19 insertions(+), 0 deletions(-)
-- 
1.5.1.1




More information about the parted-devel mailing list