Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(549)

Unified Diff: ios/testing/ocmock_complex_type_helper.h

Issue 1024443002: Upstream ios/testing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/testing/ios_testing.gyp ('k') | ios/testing/ocmock_complex_type_helper.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/testing/ocmock_complex_type_helper.h
diff --git a/ios/testing/ocmock_complex_type_helper.h b/ios/testing/ocmock_complex_type_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..ad8d83d16d75ca4200fd36c9ea1c83b53784a43a
--- /dev/null
+++ b/ios/testing/ocmock_complex_type_helper.h
@@ -0,0 +1,26 @@
+// Copyright 2012 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 IOS_TESTING_OCMOCK_COMPLEX_TYPE_HELPER_H_
+#define IOS_TESTING_OCMOCK_COMPLEX_TYPE_HELPER_H_
+
+#import "third_party/google_toolbox_for_mac/src/Foundation/GTMLightweightProxy.h"
+#import "third_party/ocmock/OCMock/OCMock.h"
+
+// OCMock cannot check scalar arguments to method as it requires NSObjects to
+// work its magic. This class tries to alleviate this restriction in a crude
+// way. For an example of use, see the associated unittest class.
+@interface OCMockComplexTypeHelper : GTMLightweightProxy
+// As opposed to its parent class the OCMockComplexTypeHelper retains its
+// represented object.
+- (instancetype)initWithRepresentedObject:(id)object;
+// Registers a block to be called when a selector is called.
+- (void)onSelector:(SEL)selector callBlockExpectation:(id)block;
+// Unregisters the block associated to the selector.
+- (void)removeBlockExpectationOnSelector:(SEL)selector;
+// Returns the block for the given selector. Intended for use by subclasses.
+- (id)blockForSelector:(SEL)selector;
+@end
+
+#endif // IOS_TESTING_OCMOCK_COMPLEX_TYPE_HELPER_H_
« no previous file with comments | « ios/testing/ios_testing.gyp ('k') | ios/testing/ocmock_complex_type_helper.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698