Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Check after leaving the stack frame.
static BOOL forceRefresh_ = NO;
-(TestAsyncRequestBlock)structBlockBuilder
{
SDRefreshTraits traits_ = { YES, NO };
TestAsyncRequestBlock block_ = ^( JFFSimpleBlock finishBlock_ )
{
forceRefresh_ = traits_.forceRefresh;
finishBlock_();
};
block_ = [ block_ copy ];
return block_;
}
-(void)testStructAndBlocks
{
TestAsyncRequestBlock block_ = [ self structBlockBuilder ];
[ self performAsyncRequestOnMainThreadWithBlock: block_
selector: _cmd ];
GHAssertTrue( forceRefresh_, @"block does not handle C struct properly" );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment