diff options
Diffstat (limited to 'Mac/Tools')
-rw-r--r-- | Mac/Tools/plistlib_generate_testdata.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Mac/Tools/plistlib_generate_testdata.py b/Mac/Tools/plistlib_generate_testdata.py index da1d976..68d4d74 100644 --- a/Mac/Tools/plistlib_generate_testdata.py +++ b/Mac/Tools/plistlib_generate_testdata.py @@ -23,7 +23,13 @@ def nsstr(value): def main(): pl = OrderedDict() + # Note: pl is an OrderedDict to control the order + # of keys, and hence have some control on the structure + # of the output file. + # New keys should be added in alphabetical order. + seconds = datetime.datetime(2004, 10, 26, 10, 33, 33, tzinfo=datetime.timezone(datetime.timedelta(0))).timestamp() + pl[nsstr('aBigInt')] = 2 ** 63 - 44 pl[nsstr('aDate')] = NSDate.dateWithTimeIntervalSince1970_(seconds) pl[nsstr('aDict')] = d = OrderedDict() @@ -52,6 +58,8 @@ def main(): aa.append(2) aa.append(3) + pl[nsstr('aNegativeBigInt')] = -80000000000 + pl[nsstr('aNegativeInt')] = -5 pl[nsstr('aString')] = nsstr('Doodah') pl[nsstr('anEmptyDict')] = NSMutableDictionary.alloc().init() |