Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
19ccab00
Commit
19ccab00
authored
Apr 25, 2023
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shallow: cleanup whitespace in tests
parent
3388f5ba
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
tests/libgit2/transports/smart/shallowarray.c
+16
-16
No files found.
tests/libgit2/transports/smart/shallowarray.c
View file @
19ccab00
...
...
@@ -15,37 +15,37 @@
void
test_transports_smart_shallowarray__add_and_remove_oid_from_shallowarray
(
void
)
{
git_oid
oid_0_obj
,
oid_1_obj
,
oid_2_obj
;
git_shallowarray
*
shallow_roots
=
git__malloc
(
sizeof
(
git_shallowarray
));
git_array_init
(
shallow_roots
->
array
);
git_oid
oid_0_obj
,
oid_1_obj
,
oid_2_obj
;
git_shallowarray
*
shallow_roots
=
git__malloc
(
sizeof
(
git_shallowarray
));
git_array_init
(
shallow_roots
->
array
);
git_oid__fromstr
(
&
oid_0_obj
,
oid_0
,
GIT_OID_SHA1
);
git_oid__fromstr
(
&
oid_1_obj
,
oid_1
,
GIT_OID_SHA1
);
git_oid__fromstr
(
&
oid_2_obj
,
oid_2
,
GIT_OID_SHA1
);
git_oid__fromstr
(
&
oid_0_obj
,
oid_0
,
GIT_OID_SHA1
);
git_oid__fromstr
(
&
oid_1_obj
,
oid_1
,
GIT_OID_SHA1
);
git_oid__fromstr
(
&
oid_2_obj
,
oid_2
,
GIT_OID_SHA1
);
git_shallowarray_add
(
shallow_roots
,
&
oid_0_obj
);
git_shallowarray_add
(
shallow_roots
,
&
oid_1_obj
);
git_shallowarray_add
(
shallow_roots
,
&
oid_2_obj
);
git_shallowarray_add
(
shallow_roots
,
&
oid_0_obj
);
git_shallowarray_add
(
shallow_roots
,
&
oid_1_obj
);
git_shallowarray_add
(
shallow_roots
,
&
oid_2_obj
);
cl_assert_equal_i
(
3
,
shallow_roots
->
array
.
size
);
cl_assert_equal_i
(
3
,
shallow_roots
->
array
.
size
);
cl_assert_equal_s
(
"c070ad8c08840c8116da865b2d65593a6bb9cd2a"
,
git_oid_tostr_s
(
&
shallow_roots
->
array
.
ptr
[
0
]));
cl_assert_equal_s
(
"0966a434eb1a025db6b71485ab63a3bfbea520b6"
,
git_oid_tostr_s
(
&
shallow_roots
->
array
.
ptr
[
1
]));
cl_assert_equal_s
(
"83834a7afdaa1a1260568567f6ad90020389f664"
,
git_oid_tostr_s
(
&
shallow_roots
->
array
.
ptr
[
2
]));
git_shallowarray_remove
(
shallow_roots
,
&
oid_2_obj
);
git_shallowarray_remove
(
shallow_roots
,
&
oid_2_obj
);
cl_assert_equal_i
(
2
,
shallow_roots
->
array
.
size
);
cl_assert_equal_i
(
2
,
shallow_roots
->
array
.
size
);
cl_assert_equal_s
(
"c070ad8c08840c8116da865b2d65593a6bb9cd2a"
,
git_oid_tostr_s
(
&
shallow_roots
->
array
.
ptr
[
0
]));
cl_assert_equal_s
(
"0966a434eb1a025db6b71485ab63a3bfbea520b6"
,
git_oid_tostr_s
(
&
shallow_roots
->
array
.
ptr
[
1
]));
git_shallowarray_remove
(
shallow_roots
,
&
oid_1_obj
);
git_shallowarray_remove
(
shallow_roots
,
&
oid_1_obj
);
cl_assert_equal_i
(
1
,
shallow_roots
->
array
.
size
);
cl_assert_equal_i
(
1
,
shallow_roots
->
array
.
size
);
cl_assert_equal_s
(
"c070ad8c08840c8116da865b2d65593a6bb9cd2a"
,
git_oid_tostr_s
(
&
shallow_roots
->
array
.
ptr
[
0
]));
git_shallowarray_remove
(
shallow_roots
,
&
oid_0_obj
);
git_shallowarray_remove
(
shallow_roots
,
&
oid_0_obj
);
cl_assert_equal_i
(
0
,
shallow_roots
->
array
.
size
);
cl_assert_equal_i
(
0
,
shallow_roots
->
array
.
size
);
git_array_clear
(
shallow_roots
->
array
);
git__free
(
shallow_roots
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment