]> git.saurik.com Git - apple/security.git/blob - SecurityTests/regressions/ut/ut-00-errors.cpp
Security-57740.1.18.tar.gz
[apple/security.git] / SecurityTests / regressions / ut / ut-00-errors.cpp
1 #include <security_utilities/errors.h>
2
3 #include "testcpp.h"
4
5 using namespace Security;
6
7 int main(int argc, char *const *argv)
8 {
9 plan_tests(5);
10
11 no_throw(, "doesn't throw");
12 does_throw(throw 1, "does throw");
13 does_throw(UnixError::throwMe(1), "throws something.");
14 is_throw(UnixError::throwMe(1), CommonError, unixError(), 1,
15 "throws UnixError 1");
16 is_throw(UnixError::throwMe(1), CommonError, osStatus(), 100001,
17 "throws osStatus 100001");
18 }