this repo has no description
at fixPythonPipStalling 25 lines 636 B view raw
1// CFLAGS: -framework foundation -framework corefoundation 2 3#import <Foundation/NSString.h> 4#import <CoreFoundation/CFString.h> 5#include <stdio.h> 6#include <assert.h> 7 8#define pass(cond) { int ok = (cond); printf("Pass %s: %s\n", #cond, (cond) ? "OK" : "FAIL"); if(!cond) exitcode = 1; } 9 10int main() 11{ 12 NSString* cfstr = (NSString*) CFSTR("TestString"); 13 NSString* nsstr = [NSString stringWithUTF8String:"TestString"]; 14 int exitcode = 0; 15 16 pass([nsstr isEqual:cfstr]); 17 pass([nsstr isEqualToString:cfstr]); 18 pass([cfstr isEqual:nsstr]); 19 pass([cfstr isEqualToString:nsstr]); 20 pass([nsstr hash] == [cfstr hash]); 21 22 return exitcode; 23} 24 25