1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "third_party/ocmock/gtest_support.h"
7 #import <Foundation/Foundation.h>
9 #import "third_party/ocmock/OCMock/OCMock.h"
11 // When C++ exceptions are disabled, the C++ library defines |try| and
12 // |catch| so as to allow exception-expecting C++ code to build properly when
13 // language support for exceptions is not present. These macros interfere
14 // with the use of |@try| and |@catch| in Objective-C files such as this one.
15 // Undefine these macros here, after everything has been #included, since
16 // there will be no C++ uses and only Objective-C uses from this point on.
23 bool VerifyOCMock(OCMockObject* mock, const char* file, int line) {
27 } @catch (NSException* e) {
29 ADD_FAILURE_AT(file, line) << "OCMock validation failed: "
30 << [[e description] UTF8String];
35 } // namespace internal
36 } // namespace testing