119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
usingBlock: ^ (OFNotification *notif) {
OFEnsure(notif == notification && !received);
received = true;
}]) && R([center postNotification: notification]) && received &&
test1->_received == 2 && test2->_received == 4 &&
test3->_received == 0 && test4->_received == 0)
/* Act like the blocks test didn't happen. */
[center removeObserver: handle];
test1->_received--;
test2->_received--;
#endif
TEST(@"-[removeObserver:selector:name:object:]",
R([center removeObserver: test1
|
|
|
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
usingBlock: ^ (OFNotification *notif) {
OFEnsure(notif == notification && !received);
received = true;
}]) && R([center postNotification: notification]) && received &&
test1->_received == 2 && test2->_received == 4 &&
test3->_received == 0 && test4->_received == 0)
/* Act like the block test didn't happen. */
[center removeObserver: handle];
test1->_received--;
test2->_received--;
#endif
TEST(@"-[removeObserver:selector:name:object:]",
R([center removeObserver: test1
|