this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Created a test: cfbridge_strequals.m

+25
+25
tests/src/cfbridge_strequals.m
··· 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 + 10 + int 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 +