|
15 | 15 |
|
16 | 16 | void test_transports_smart_shallowarray__add_and_remove_oid_from_shallowarray(void) |
17 | 17 | { |
18 | | - git_oid oid_0_obj, oid_1_obj, oid_2_obj; |
19 | | - git_shallowarray *shallow_roots = git__malloc(sizeof(git_shallowarray)); |
20 | | - git_array_init(shallow_roots->array); |
| 18 | + git_oid oid_0_obj, oid_1_obj, oid_2_obj; |
| 19 | + git_shallowarray *shallow_roots = git__malloc(sizeof(git_shallowarray)); |
| 20 | + git_array_init(shallow_roots->array); |
21 | 21 |
|
22 | | - git_oid__fromstr(&oid_0_obj, oid_0, GIT_OID_SHA1); |
23 | | - git_oid__fromstr(&oid_1_obj, oid_1, GIT_OID_SHA1); |
24 | | - git_oid__fromstr(&oid_2_obj, oid_2, GIT_OID_SHA1); |
| 22 | + git_oid__fromstr(&oid_0_obj, oid_0, GIT_OID_SHA1); |
| 23 | + git_oid__fromstr(&oid_1_obj, oid_1, GIT_OID_SHA1); |
| 24 | + git_oid__fromstr(&oid_2_obj, oid_2, GIT_OID_SHA1); |
25 | 25 |
|
26 | | - git_shallowarray_add(shallow_roots, &oid_0_obj); |
27 | | - git_shallowarray_add(shallow_roots, &oid_1_obj); |
28 | | - git_shallowarray_add(shallow_roots, &oid_2_obj); |
| 26 | + git_shallowarray_add(shallow_roots, &oid_0_obj); |
| 27 | + git_shallowarray_add(shallow_roots, &oid_1_obj); |
| 28 | + git_shallowarray_add(shallow_roots, &oid_2_obj); |
29 | 29 |
|
30 | | - cl_assert_equal_i(3, shallow_roots->array.size); |
| 30 | + cl_assert_equal_i(3, shallow_roots->array.size); |
31 | 31 | cl_assert_equal_s("c070ad8c08840c8116da865b2d65593a6bb9cd2a", git_oid_tostr_s(&shallow_roots->array.ptr[0])); |
32 | 32 | cl_assert_equal_s("0966a434eb1a025db6b71485ab63a3bfbea520b6", git_oid_tostr_s(&shallow_roots->array.ptr[1])); |
33 | 33 | cl_assert_equal_s("83834a7afdaa1a1260568567f6ad90020389f664", git_oid_tostr_s(&shallow_roots->array.ptr[2])); |
34 | 34 |
|
35 | | - git_shallowarray_remove(shallow_roots, &oid_2_obj); |
| 35 | + git_shallowarray_remove(shallow_roots, &oid_2_obj); |
36 | 36 |
|
37 | | - cl_assert_equal_i(2, shallow_roots->array.size); |
| 37 | + cl_assert_equal_i(2, shallow_roots->array.size); |
38 | 38 | cl_assert_equal_s("c070ad8c08840c8116da865b2d65593a6bb9cd2a", git_oid_tostr_s(&shallow_roots->array.ptr[0])); |
39 | 39 | cl_assert_equal_s("0966a434eb1a025db6b71485ab63a3bfbea520b6", git_oid_tostr_s(&shallow_roots->array.ptr[1])); |
40 | 40 |
|
41 | | - git_shallowarray_remove(shallow_roots, &oid_1_obj); |
| 41 | + git_shallowarray_remove(shallow_roots, &oid_1_obj); |
42 | 42 |
|
43 | | - cl_assert_equal_i(1, shallow_roots->array.size); |
| 43 | + cl_assert_equal_i(1, shallow_roots->array.size); |
44 | 44 | cl_assert_equal_s("c070ad8c08840c8116da865b2d65593a6bb9cd2a", git_oid_tostr_s(&shallow_roots->array.ptr[0])); |
45 | 45 |
|
46 | | - git_shallowarray_remove(shallow_roots, &oid_0_obj); |
| 46 | + git_shallowarray_remove(shallow_roots, &oid_0_obj); |
47 | 47 |
|
48 | | - cl_assert_equal_i(0, shallow_roots->array.size); |
| 48 | + cl_assert_equal_i(0, shallow_roots->array.size); |
49 | 49 |
|
50 | 50 | git_array_clear(shallow_roots->array); |
51 | 51 | git__free(shallow_roots); |
|
0 commit comments