Ejemplo n.º 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)
Ejemplo n.º 2
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)
Ejemplo n.º 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)
Ejemplo n.º 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)