diff options
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
2 files changed, 9 insertions, 6 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py index da389819fd4..d7d4118d1d6 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/TestDataFormatterObjC.py @@ -271,16 +271,18 @@ class ObjCDataFormatterTestCase(TestBase): # this test might fail if we hit the breakpoint late on December 31st of some given year # and midnight comes between hitting the breakpoint and running this line of code # hopefully the output will be revealing enough in that case :-) - now_year = str(datetime.datetime.now().year) + now_year = '%s-' % str(datetime.datetime.now().year) - self.expect('frame variable date3 date4', - substrs = [now_year,'1970']) + self.expect('frame variable date3', substrs = [now_year]) + self.expect('frame variable date4', substrs = ['1970']) + self.expect('frame variable date5', substrs = [now_year]) self.expect('frame variable date1_abs date2_abs', substrs = ['1985-04','2011-01']) - self.expect('frame variable date3_abs date4_abs', - substrs = [now_year,'1970']) + self.expect('frame variable date3_abs', substrs = [now_year]) + self.expect('frame variable date4_abs', substrs = ['1970']) + self.expect('frame variable date5_abs', substrs = [now_year]) self.expect('frame variable cupertino home europe', substrs = ['@"America/Los_Angeles"', @@ -358,7 +360,6 @@ class ObjCDataFormatterTestCase(TestBase): self.runCmd('type format clear', check=False) self.runCmd('type summary clear', check=False) self.runCmd('type synth clear', check=False) - self.runCmd('log timers disable', check=False) # Execute the cleanup function during test case tear down. diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/main.m b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/main.m index 87a0e27a6b0..020e2fc6227 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/main.m +++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/main.m @@ -489,11 +489,13 @@ int main (int argc, const char * argv[]) NSDate *date2 = [NSDate dateWithNaturalLanguageString:@"12am January 1, 2011"]; NSDate *date3 = [NSDate date]; NSDate *date4 = [NSDate dateWithTimeIntervalSince1970:24*60*60]; + NSDate *date5 = [NSDate dateWithTimeIntervalSinceReferenceDate: floor([[NSDate date] timeIntervalSinceReferenceDate])]; CFAbsoluteTime date1_abs = CFDateGetAbsoluteTime(date1); CFAbsoluteTime date2_abs = CFDateGetAbsoluteTime(date2); CFAbsoluteTime date3_abs = CFDateGetAbsoluteTime(date3); CFAbsoluteTime date4_abs = CFDateGetAbsoluteTime(date4); + CFAbsoluteTime date5_abs = CFDateGetAbsoluteTime(date5); NSIndexSet *iset1 = [[NSIndexSet alloc] initWithIndexesInRange:NSMakeRange(1, 4)]; NSIndexSet *iset2 = [[NSIndexSet alloc] initWithIndexesInRange:NSMakeRange(1, 512)]; |