Hi,

I find myself needing to count a test that I expect to fail an assertion
(I'm using CMake 2.8.4). My first attempt, using the test property
WILL_FAIL, erm, failed because apparently an abort is trapped as an
exception rather than a failing execution.

I have worked around this for now by writing a wrapper script, but can I
suggest two enhancements (assuming this behavior isn't implemented
somewhere I haven't found)?

   1. WILL_FAIL be enhanced to take a number as well as true (if this is
      possible) such that if a number is passed then that is the error
      code expected and anything else is a failure.
   2. A new property WILL_FAIL_ASSERTION which can be either true or a
      regular expression specifying the particular assertion to be
      expected, with anything else (even another assertion) being a test
      failure.

Of course, anything that provides the desired behavior (preferably by
specifying a test property) would be perfectly fine: the above are
merely suggestions.

Thanks,
Chris.

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to