Files
swift-mirror/test/1_stdlib/Inputs/SlurpFastEnumeration/SlurpFastEnumeration.m
Jordan Rose e83c117c30 [test] Hack: run stdlib tests first to start long-running tests earlier.
This decreases total testing time by over a minute on my old Mac Pro.
It probably has much less effect on systems with fewer cores, but shouldn't
be any worse there.

Swift SVN r22745
2014-10-15 01:30:51 +00:00

20 lines
559 B
Objective-C

#include <Foundation/Foundation.h>
void slurpFastEnumerationOfArrayFromObjCImpl(id Array, id<NSFastEnumeration> FE,
NSMutableArray *Values) {
NSArray *NSA = Array;
for (NSObject *Value in FE) {
[Values addObject: Value];
}
}
void slurpFastEnumerationOfDictionaryFromObjCImpl(
id Dictionary, id<NSFastEnumeration> FE, NSMutableArray *KeyValuePairs) {
NSDictionary *NSD = Dictionary;
for (NSObject *Key in FE) {
[KeyValuePairs addObject: Key];
[KeyValuePairs addObject: NSD[Key]];
}
}