Fix testDividesAllocatedAndUnAllocated

Summary: This test is broken because of changes to the way that Simulators are mocked in a pool, this fixes the test.

Reviewed By: phyllipecesar, marekcirkos

Differential Revision: D3190833

fb-gh-sync-id: 997a11c3823b5550828f4fedf1458309747f0b90
fbshipit-source-id: 997a11c3823b5550828f4fedf1458309747f0b90
This commit is contained in:
Lawrence Lomax 2016-04-18 05:40:56 -07:00 коммит произвёл Facebook Github Bot 1
Родитель 6477f0de87
Коммит 1e398ef2cc
3 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -35,8 +35,8 @@
]];
[self mockAllocationOfSimulatorsUDIDs:@[
[mockedSimulators[0] UDID],
[mockedSimulators[3] UDID]
[mockedSimulators[0] udid],
[mockedSimulators[3] udid]
]];
NSArray *simulators = self.pool.allocatedSimulators;

Просмотреть файл

@ -37,6 +37,6 @@
/**
Mocks the Allocation of Simulators based on their UDID.
*/
- (void)mockAllocationOfSimulatorsUDIDs:(NSArray *)deviceUDIDs;
- (void)mockAllocationOfSimulatorsUDIDs:(NSArray<NSString *> *)deviceUDIDs;
@end

Просмотреть файл

@ -65,12 +65,12 @@
return simulators;
}
- (void)mockAllocationOfSimulatorsUDIDs:(NSArray *)deviceUDIDs
- (void)mockAllocationOfSimulatorsUDIDs:(NSArray<NSString *> *)deviceUDIDs
{
NSDictionary *simulatorsByUDID = [NSDictionary dictionaryWithObjects:self.set.allSimulators forKeys:[self.set.allSimulators valueForKey:@"udid"]];
for (NSUUID *udid in deviceUDIDs) {
[self.pool.allocatedUDIDs addObject:udid.UUIDString];
[simulatorsByUDID[udid.UUIDString] setPool:self.pool];
NSDictionary<NSString *, FBSimulator *> *simulatorsByUDID = [NSDictionary dictionaryWithObjects:self.set.allSimulators forKeys:[self.set.allSimulators valueForKey:@"udid"]];
for (NSString *udid in deviceUDIDs) {
[self.pool.allocatedUDIDs addObject:udid];
[simulatorsByUDID[udid] setPool:self.pool];
}
}