Changed methodQueue to a property

This commit is contained in:
Nick Lockwood
2015-06-19 04:18:54 -07:00
parent cf0e40ad3d
commit c8c254ce13
6 changed files with 84 additions and 83 deletions

View File

@@ -79,25 +79,19 @@ RCT_EXPORT_MODULE()
{
RCTBridge *_bridge;
BOOL _testMethodCalled;
dispatch_queue_t _queue;
}
@end
@implementation RCTBridgeTests
RCT_EXPORT_MODULE(TestModule)
@synthesize methodQueue = _methodQueue;
- (dispatch_queue_t)methodQueue
{
return _queue;
}
RCT_EXPORT_MODULE(TestModule)
- (void)setUp
{
[super setUp];
_queue = dispatch_queue_create("com.facebook.React.TestQueue", DISPATCH_QUEUE_SERIAL);
_bridge = [[RCTBridge alloc] initWithBundleURL:nil
moduleProvider:^{ return @[self]; }
launchOptions:nil];
@@ -151,7 +145,7 @@ RCT_EXPORT_MODULE(TestModule)
[_bridge.batchedBridge _handleBuffer:buffer context:RCTGetExecutorID(executor)];
dispatch_sync(_queue, ^{
dispatch_sync(_methodQueue, ^{
// clear the queue
XCTAssertTrue(_testMethodCalled);
});