parent
0a2baf8eaf
commit
fd9acf6a48
|
@ -460,6 +460,7 @@ class ObjCDataFormatterTestCase(TestBase):
|
|||
self.expect('frame variable localhost',
|
||||
substrs = ['<NSHost ','> localhost ((','"127.0.0.1"'])
|
||||
|
||||
if self.getArchitecture() in ['i386', 'x86_64']:
|
||||
self.expect('frame variable my_task',
|
||||
substrs = ['<NS','Task: 0x'])
|
||||
|
||||
|
@ -571,8 +572,7 @@ class ObjCDataFormatterTestCase(TestBase):
|
|||
|
||||
# check formatters for common Objective-C types
|
||||
self.runCmd("log timers enable")
|
||||
self.expect("frame variable",
|
||||
substrs = ['(CFGregorianUnits) cf_greg_units = 1 years, 3 months, 5 days, 12 hours, 5 minutes 7 seconds',
|
||||
expect_strings = ['(CFGregorianUnits) cf_greg_units = 1 years, 3 months, 5 days, 12 hours, 5 minutes 7 seconds',
|
||||
'(CFRange) cf_range = location=4 length=4',
|
||||
'(NSPoint) ns_point = (x=4, y=4)',
|
||||
'(NSRange) ns_range = location=4, length=4',
|
||||
|
@ -584,17 +584,22 @@ class ObjCDataFormatterTestCase(TestBase):
|
|||
'(CGSize) cg_size = (width=1, height=6)',
|
||||
'(CGPoint) cg_point = (x=2, y=7)',
|
||||
'(CGRect) cg_rect = origin=(x=1, y=2) size=(width=7, height=7)',
|
||||
'(RGBColor) rgb_color = red=3 green=56 blue=35',
|
||||
'(RGBColor *) rgb_color_ptr = red=3 green=56 blue=35',
|
||||
'(Rect) rect = (t=4, l=8, b=4, r=7)',
|
||||
'(Rect *) rect_ptr = (t=4, l=8, b=4, r=7)',
|
||||
'(Point) point = (v=7, h=12)',
|
||||
'(Point *) point_ptr = (v=7, h=12)',
|
||||
'(HIPoint) hi_point = (x=7, y=12)',
|
||||
'(HIRect) hi_rect = origin=(x=3, y=5) size=(width=4, height=6)',
|
||||
'name:@"TheGuyWhoHasNoName" reason:@"cuz it\'s funny"',
|
||||
'1985',
|
||||
'foo_selector_impl'])
|
||||
'foo_selector_impl'];
|
||||
|
||||
if self.getArchitecture() in ['i386', 'x86_64']:
|
||||
expect_strings.append('(HIPoint) hi_point = (x=7, y=12)')
|
||||
expect_strings.append('(HIRect) hi_rect = origin=(x=3, y=5) size=(width=4, height=6)')
|
||||
expect_strings.append('(RGBColor) rgb_color = red=3 green=56 blue=35')
|
||||
expect_strings.append('(RGBColor *) rgb_color_ptr = red=3 green=56 blue=35')
|
||||
|
||||
self.expect("frame variable",
|
||||
substrs = expect_strings)
|
||||
self.runCmd('log timers dump')
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,18 @@
|
|||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#include <Carbon/Carbon.h>
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__arm__)
|
||||
#define IOS
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(IOS)
|
||||
#import <Foundation/NSGeometry.h>
|
||||
#else
|
||||
#import <Carbon/Carbon.h>
|
||||
#endif
|
||||
|
||||
@interface MyClass : NSObject
|
||||
{
|
||||
|
@ -193,7 +204,7 @@ int main (int argc, const char * argv[])
|
|||
|
||||
NSString *str10 = [NSString stringWithFormat:@"This is a Unicode string %S number %ld right here", myNextCharacters, (long)4];
|
||||
|
||||
NSString *str11 = [str10 className];
|
||||
NSString *str11 = NSStringFromClass([str10 class]);
|
||||
|
||||
NSString *label1 = @"Process Name: ";
|
||||
NSString *label2 = @"Process Id: ";
|
||||
|
@ -223,7 +234,7 @@ int main (int argc, const char * argv[])
|
|||
|
||||
NSString *strA10 = [NSString stringWithFormat:@"This is a Unicode string %S number %ld right here", myNextCharacters, (long)4];
|
||||
|
||||
NSString *strA11 = [str10 className];
|
||||
NSString *strA11 = NSStringFromClass([str10 class]);
|
||||
|
||||
NSString *strA12 = [NSString stringWithFormat:@"%@ %@ %@ %@", label1, processName, label2, processID];
|
||||
|
||||
|
@ -249,11 +260,11 @@ int main (int argc, const char * argv[])
|
|||
|
||||
NSString *strB10 = [NSString stringWithFormat:@"This is a Unicode string %S number %ld right here", myNextCharacters, (long)4];
|
||||
|
||||
NSString *strB11 = [str10 className];
|
||||
NSString *strB11 = NSStringFromClass([str10 class]);
|
||||
|
||||
NSString *strB12 = [NSString stringWithFormat:@"%@ %@ %@ %@", label1, processName, label2, processID];
|
||||
|
||||
NSString *strC11 = [str10 className];
|
||||
NSString *strC11 = NSStringFromClass([str10 class]);
|
||||
|
||||
NSString *strC12 = [NSString stringWithFormat:@"%@ %@ %@ %@", label1, processName, label2, processID];
|
||||
|
||||
|
@ -279,7 +290,7 @@ int main (int argc, const char * argv[])
|
|||
|
||||
NSString *strC10 = [NSString stringWithFormat:@"This is a Unicode string %S number %ld right here", myNextCharacters, (long)4];
|
||||
|
||||
NSString *strD11 = [str10 className];
|
||||
NSString *strD11 = NSStringFromClass([str10 class]);
|
||||
|
||||
NSString *strD12 = [NSString stringWithFormat:@"%@ %@ %@ %@", label1, processName, label2, processID];
|
||||
|
||||
|
@ -589,7 +600,9 @@ int main (int argc, const char * argv[])
|
|||
|
||||
NSHost *localhost = [NSHost hostWithAddress:@"127.0.0.1"];
|
||||
|
||||
#ifndef IOS
|
||||
NSTask *my_task = [[NSTask alloc] init];
|
||||
#endif
|
||||
|
||||
|
||||
CFGregorianUnits cf_greg_units = {1,3,5,12,5,7};
|
||||
|
@ -610,8 +623,10 @@ int main (int argc, const char * argv[])
|
|||
CGPoint cg_point = {2,7};
|
||||
CGRect cg_rect = {{1,2}, {7,7}};
|
||||
|
||||
#ifndef IOS
|
||||
RGBColor rgb_color = {3,56,35};
|
||||
RGBColor* rgb_color_ptr = &rgb_color;
|
||||
#endif
|
||||
|
||||
Rect rect = {4,8,4,7};
|
||||
Rect* rect_ptr = ▭
|
||||
|
@ -619,8 +634,10 @@ int main (int argc, const char * argv[])
|
|||
Point point = {7,12};
|
||||
Point* point_ptr = &point;
|
||||
|
||||
#ifndef IOS
|
||||
HIPoint hi_point = {7,12};
|
||||
HIRect hi_rect = {{3,5},{4,6}};
|
||||
#endif
|
||||
|
||||
SEL foo_selector = @selector(foo_selector_impl);
|
||||
|
||||
|
|
Loading…
Reference in New Issue