Lines Matching defs:Error

52 TEST(Error, CheckedSuccess) {
53 Error E = Error::success();
54 EXPECT_FALSE(E) << "Unexpected error while testing Error 'Success'";
58 TEST(Error, ConsumeSuccess) { consumeError(Error::success()); }
60 TEST(Error, ConsumeError) {
61 Error E = make_error<CustomError>(42);
65 ADD_FAILURE() << "Error failure value should convert to true";
69 TEST(Error, UncheckedSuccess) {
70 EXPECT_DEATH({ Error E = Error::success(); },
71 "Error must be checked prior to destruction")
72 << "Unchecked Error Succes value did not cause abort()";
76 TEST(Error, CheckedButUnhandledError) {
78 Error E = make_error<CustomError>(42);
82 "Error must be checked prior to destruction")
83 << "Unhandled Error failure value did not cause an abort()";
87 TEST(Error, BasicErrorCast) {
120 static void errAsOutParamHelper(Error &Err) {
123 Err = Error::success();
130 TEST(Error, ErrorAsOutParameterChecked) {
131 Error E = Error::success();
137 TEST(Error, ErrorAsOutParameterUnchecked) {
140 Error E = Error::success();
143 "Error must be checked prior to destruction")
147 // Check 'Error::isA<T>' method handling.
148 TEST(Error, IsAHandling) {
150 Error E = make_error<CustomError>(42);
151 Error F = make_error<CustomSubError>(42, "foo");
152 Error G = Error::success();
165 TEST(Error, StringError) {
174 TEST(Error, CheckedExpectedInSuccessMode) {
182 TEST(Error, ExpectedWithReferenceType) {
192 // We expect this to blow up the same way Error would.
194 TEST(Error, UncheckedExpectedInSuccessModeDestruction) {
201 // We expect this to blow up the same way Error would.
203 TEST(Error, UncheckedExpectedInSuccessModeAccess) {
214 // We expect this to blow up the same way Error would.
216 TEST(Error, UncheckedExpectedInSuccessModeAssignment) {
227 TEST(Error, ExpectedInFailureMode) {
230 Error E = A.takeError();
238 TEST(Error, AccessExpectedInFailureMode) {
248 TEST(Error, UnhandledExpectedInFailureMode) {
255 TEST(Error, ExpectedCovariance) {
275 TEST(Error, CantFailSuccess) {
276 cantFail(Error::success());
287 TEST(Error, CantFailDeath) {
290 << "cantFail(Error) did not cause an abort for failure value";