X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/80e2389990082500d76eb566d4946be3e786c3ef..d8f41ccd20de16f8ebe2ccc84d47bf1cb2b26bbb:/SecurityTests/regressions/ut/ut-00-errors.cpp?ds=inline diff --git a/SecurityTests/regressions/ut/ut-00-errors.cpp b/SecurityTests/regressions/ut/ut-00-errors.cpp new file mode 100755 index 00000000..a06e85f3 --- /dev/null +++ b/SecurityTests/regressions/ut/ut-00-errors.cpp @@ -0,0 +1,18 @@ +#include + +#include "testcpp.h" + +using namespace Security; + +int main(int argc, char *const *argv) +{ + plan_tests(5); + + no_throw(, "doesn't throw"); + does_throw(throw 1, "does throw"); + does_throw(UnixError::throwMe(1), "throws something."); + is_throw(UnixError::throwMe(1), CommonError, unixError(), 1, + "throws UnixError 1"); + is_throw(UnixError::throwMe(1), CommonError, osStatus(), 100001, + "throws osStatus 100001"); +}