parent
0a2baf8eaf
commit
fd9acf6a48
|
@ -460,8 +460,9 @@ class ObjCDataFormatterTestCase(TestBase):
|
||||||
self.expect('frame variable localhost',
|
self.expect('frame variable localhost',
|
||||||
substrs = ['<NSHost ','> localhost ((','"127.0.0.1"'])
|
substrs = ['<NSHost ','> localhost ((','"127.0.0.1"'])
|
||||||
|
|
||||||
self.expect('frame variable my_task',
|
if self.getArchitecture() in ['i386', 'x86_64']:
|
||||||
substrs = ['<NS','Task: 0x'])
|
self.expect('frame variable my_task',
|
||||||
|
substrs = ['<NS','Task: 0x'])
|
||||||
|
|
||||||
self.expect('frame variable range_value',
|
self.expect('frame variable range_value',
|
||||||
substrs = ['NSRange: {4, 4}'])
|
substrs = ['NSRange: {4, 4}'])
|
||||||
|
@ -571,30 +572,34 @@ class ObjCDataFormatterTestCase(TestBase):
|
||||||
|
|
||||||
# check formatters for common Objective-C types
|
# check formatters for common Objective-C types
|
||||||
self.runCmd("log timers enable")
|
self.runCmd("log timers enable")
|
||||||
|
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',
|
||||||
|
'(NSRect *) ns_rect_ptr = (x=1, y=1), (width=5, height=5)',
|
||||||
|
'(NSRect) ns_rect = (x=1, y=1), (width=5, height=5)',
|
||||||
|
'(NSRectArray) ns_rect_arr = ((x=1, y=1), (width=5, height=5)), ...',
|
||||||
|
'(NSSize) ns_size = (width=5, height=7)',
|
||||||
|
'(NSSize *) ns_size_ptr = (width=5, height=7)',
|
||||||
|
'(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)',
|
||||||
|
'(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)',
|
||||||
|
'name:@"TheGuyWhoHasNoName" reason:@"cuz it\'s funny"',
|
||||||
|
'1985',
|
||||||
|
'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",
|
self.expect("frame variable",
|
||||||
substrs = ['(CFGregorianUnits) cf_greg_units = 1 years, 3 months, 5 days, 12 hours, 5 minutes 7 seconds',
|
substrs = expect_strings)
|
||||||
'(CFRange) cf_range = location=4 length=4',
|
|
||||||
'(NSPoint) ns_point = (x=4, y=4)',
|
|
||||||
'(NSRange) ns_range = location=4, length=4',
|
|
||||||
'(NSRect *) ns_rect_ptr = (x=1, y=1), (width=5, height=5)',
|
|
||||||
'(NSRect) ns_rect = (x=1, y=1), (width=5, height=5)',
|
|
||||||
'(NSRectArray) ns_rect_arr = ((x=1, y=1), (width=5, height=5)), ...',
|
|
||||||
'(NSSize) ns_size = (width=5, height=7)',
|
|
||||||
'(NSSize *) ns_size_ptr = (width=5, height=7)',
|
|
||||||
'(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'])
|
|
||||||
self.runCmd('log timers dump')
|
self.runCmd('log timers dump')
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,18 @@
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#import <Foundation/Foundation.h>
|
#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
|
@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 *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 *label1 = @"Process Name: ";
|
||||||
NSString *label2 = @"Process Id: ";
|
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 *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];
|
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 *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 *strB12 = [NSString stringWithFormat:@"%@ %@ %@ %@", label1, processName, label2, processID];
|
||||||
|
|
||||||
NSString *strC11 = [str10 className];
|
NSString *strC11 = NSStringFromClass([str10 class]);
|
||||||
|
|
||||||
NSString *strC12 = [NSString stringWithFormat:@"%@ %@ %@ %@", label1, processName, label2, processID];
|
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 *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];
|
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"];
|
NSHost *localhost = [NSHost hostWithAddress:@"127.0.0.1"];
|
||||||
|
|
||||||
|
#ifndef IOS
|
||||||
NSTask *my_task = [[NSTask alloc] init];
|
NSTask *my_task = [[NSTask alloc] init];
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
CFGregorianUnits cf_greg_units = {1,3,5,12,5,7};
|
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};
|
CGPoint cg_point = {2,7};
|
||||||
CGRect cg_rect = {{1,2}, {7,7}};
|
CGRect cg_rect = {{1,2}, {7,7}};
|
||||||
|
|
||||||
|
#ifndef IOS
|
||||||
RGBColor rgb_color = {3,56,35};
|
RGBColor rgb_color = {3,56,35};
|
||||||
RGBColor* rgb_color_ptr = &rgb_color;
|
RGBColor* rgb_color_ptr = &rgb_color;
|
||||||
|
#endif
|
||||||
|
|
||||||
Rect rect = {4,8,4,7};
|
Rect rect = {4,8,4,7};
|
||||||
Rect* rect_ptr = ▭
|
Rect* rect_ptr = ▭
|
||||||
|
@ -619,8 +634,10 @@ int main (int argc, const char * argv[])
|
||||||
Point point = {7,12};
|
Point point = {7,12};
|
||||||
Point* point_ptr = &point;
|
Point* point_ptr = &point;
|
||||||
|
|
||||||
|
#ifndef IOS
|
||||||
HIPoint hi_point = {7,12};
|
HIPoint hi_point = {7,12};
|
||||||
HIRect hi_rect = {{3,5},{4,6}};
|
HIRect hi_rect = {{3,5},{4,6}};
|
||||||
|
#endif
|
||||||
|
|
||||||
SEL foo_selector = @selector(foo_selector_impl);
|
SEL foo_selector = @selector(foo_selector_impl);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue