1/* 2 * Copyright (c) 2010 Apple Inc. All rights reserved. 3 * 4 * @APPLE_LLVM_LICENSE_HEADER@ 5 */ 6 7// 8// sort.m 9// testObjects 10// 11// Created by Blaine Garst on 1/9/09. 12// Copyright 2009 Apple. All rights reserved. 13// 14 15// TEST_CFLAGS -framework Foundation 16 17#import <Foundation/Foundation.h> 18#import "test.h" 19 20int main() { 21 NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; 22 NSArray *array __unused = [[NSArray array] sortedArrayUsingComparator:^(id one, id two __unused) { if ([one self]) return (NSComparisonResult)NSOrderedSame; return (NSComparisonResult)NSOrderedAscending; }]; 23 [pool drain]; 24 25 succeed(__FILE__); 26} 27