|
OLD | NEW |
---|---|
(Empty) | |
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. | |
4 | |
5 #ifndef THIRD_PARTY_OCMOCK_GTEST_SUPPORT_H_ | |
6 #define THIRD_PARTY_OCMOCK_GTEST_SUPPORT_H_ | |
7 | |
8 | |
Mark Mentovai
2011/05/16 22:16:38
I am unnecessary.
(The blank line, that is.)
TVL
2011/05/17 14:57:16
Done.
| |
9 @class OCMockObject; | |
10 | |
11 namespace testing { | |
12 namespace mac { | |
13 | |
14 // Calls -verify of the mock and traps the Objective-C exception that is | |
15 // 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.
| |
16 // for if there was an exception. The result should be used in normal | |
17 // gtest EXECPT_TRUE/ASSERT_TRUE fashion, for example: | |
18 // | |
19 // 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.
| |
20 // ... | |
21 // 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.
| |
22 // | |
23 bool VerifyOCMock(OCMockObject* mock); | |
24 | |
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.
| |
25 } // namespace mac | |
26 } // namespace testing | |
27 | |
28 #endif // THIRD_PARTY_OCMOCK_GTEST_SUPPORT_H_ | |
OLD | NEW |