コード例 #1
0
def main(argv):
    if len(argv) != 2:
        print_usage()
        exit(1)
    json_data = argv[0]
    order = argv[1]
    diff = load_json_file(json_data)
    if order == 'TAG':
        sort_func = sort_diff_by_tags
    elif order == 'ALPHABET':
        sort_func = sort_diff_in_alphabetical_order
    else:
        print_usage()
        exit(1)
    sorted_diff = sort_func(diff)
    out = Colorize(sys.stdout)
    print_diff(sorted_diff, out)
コード例 #2
0
ファイル: print_idl_diff.py プロジェクト: mirror/chromium
def main(argv):
    if len(argv) != 2:
        print_usage()
        exit(1)
    json_data = argv[0]
    order = argv[1]
    diff = load_json_file(json_data)
    if order == "TAG":
        sort_func = sort_diff_by_tags
    elif order == "ALPHABET":
        sort_func = sort_diff_in_alphabetical_order
    else:
        print_usage()
        exit(1)
    sorted_diff = sort_func(diff)
    out = Colorize(sys.stdout)
    print_diff(sorted_diff, out)
コード例 #3
0
 def setUp(self):
     old = generate_idl_diff.load_json_file(old_data_path)
     new = generate_idl_diff.load_json_file(new_data_path)
     self.diff = generate_idl_diff.interfaces_diff(old, new)
コード例 #4
0
 def setUp(self):
     old = generate_idl_diff.load_json_file(old_data_path)
     new = generate_idl_diff.load_json_file(new_data_path)
     self.diff = generate_idl_diff.interfaces_diff(old, new)