Index: third_party/ocmock/gtest_support.h |
=================================================================== |
--- third_party/ocmock/gtest_support.h (revision 0) |
+++ third_party/ocmock/gtest_support.h (revision 0) |
@@ -0,0 +1,28 @@ |
+// Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef THIRD_PARTY_OCMOCK_GTEST_SUPPORT_H_ |
+#define THIRD_PARTY_OCMOCK_GTEST_SUPPORT_H_ |
+ |
+ |
Mark Mentovai
2011/05/16 22:16:38
I am unnecessary.
(The blank line, that is.)
TVL
2011/05/17 14:57:16
Done.
|
+@class OCMockObject; |
+ |
+namespace testing { |
+namespace mac { |
+ |
+// Calls -verify of the mock and traps the Objective-C exception that is |
+// generated, adding it to the gtest failures and return true/false |
Mark Mentovai
2011/05/16 22:16:38
Proofread this comment.
TVL
2011/05/17 14:57:16
Done.
|
+// for if there was an exception. The result should be used in normal |
+// gtest EXECPT_TRUE/ASSERT_TRUE fashion, for example: |
+// |
+// id mockFoo = [OCMockObject mockForClass:[Foo class]]; |
Mark Mentovai
2011/05/16 22:16:38
Perhaps show an example of the traditional OCMock
TVL
2011/05/17 14:57:16
Done.
|
+// ... |
+// ASSERT_TRUE(testing::mac::VerifyOCMock(mockFoo)); |
Mark Mentovai
2011/05/16 22:16:38
If you switch to EXPECT at the actual call sites,
TVL
2011/05/17 14:57:16
Done.
|
+// |
+bool VerifyOCMock(OCMockObject* mock); |
+ |
Mark Mentovai
2011/05/16 22:16:38
Is it worth providing macros like EXPECT_OCMOCK_VE
TVL
2011/05/17 14:57:16
Done.
|
+} // namespace mac |
+} // namespace testing |
+ |
+#endif // THIRD_PARTY_OCMOCK_GTEST_SUPPORT_H_ |
Property changes on: third_party/ocmock/gtest_support.h |
___________________________________________________________________ |
Added: svn:eol-style |
+ LF |