Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
cellframe-sdk
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Code
Merge requests
16
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cellframe
cellframe-sdk
Commits
93f93f38
Commit
93f93f38
authored
6 months ago
by
Roman Khlopkov
🔜
Browse files
Options
Downloads
Patches
Plain Diff
[*] Tests fix
parent
fa6f84ec
No related branches found
No related tags found
2 merge requests
!1779
Hotfix 12914
,
!1778
hotfix-12909
Pipeline
#43887
passed with stage
in 10 minutes and 34 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/type/blocks/tests/dap_chain_blocks_test.c
+4
-4
4 additions, 4 deletions
modules/type/blocks/tests/dap_chain_blocks_test.c
with
4 additions
and
4 deletions
modules/type/blocks/tests/dap_chain_blocks_test.c
+
4
−
4
View file @
93f93f38
...
...
@@ -15,7 +15,7 @@ dap_hash_fast_t dap_chain_block_test_add_new_block (dap_hash_fast_t *a_prev_bloc
dap_chain_block_t
*
l_block
=
dap_chain_block_new
(
a_prev_block_hash
,
&
l_block_size
);
dap_assert_PIF
(
l_block
!=
NULL
,
"Creating of block:"
);
dap_hash_fast
(
l_block
,
l_block_size
,
&
l_block_hash
);
dap_chain_atom_verify_res_t
ret_val
=
a_chain
->
callback_atom_add
(
a_chain
,
(
dap_chain_atom_ptr_t
)
l_block
,
l_block_size
,
&
l_block_hash
);
dap_chain_atom_verify_res_t
ret_val
=
a_chain
->
callback_atom_add
(
a_chain
,
(
dap_chain_atom_ptr_t
)
l_block
,
l_block_size
,
&
l_block_hash
,
false
);
dap_assert_PIF
(
(
ret_val
==
ATOM_ACCEPT
||
ret_val
==
ATOM_FORK
),
"Add block into chain: "
);
if
(
a_block
)
...
...
@@ -113,7 +113,7 @@ void dap_chain_blocks_test()
l_block_hash_copy
=
DAP_DUP
(
&
l_block_hash
);
l_first_branch_atoms_list
=
dap_list_append
(
l_first_branch_atoms_list
,
l_block_hash_copy
);
dap_chain_atom_verify_res_t
ret_val
=
l_chain
->
callback_atom_add
(
l_chain
,
(
dap_chain_atom_ptr_t
)
l_block_double_main_branch
,
l_block_double_main_branch_size
,
&
l_block_double_main_branch_hash
);
dap_chain_atom_verify_res_t
ret_val
=
l_chain
->
callback_atom_add
(
l_chain
,
(
dap_chain_atom_ptr_t
)
l_block_double_main_branch
,
l_block_double_main_branch_size
,
&
l_block_double_main_branch_hash
,
false
);
dap_assert_PIF
(
ret_val
==
ATOM_PASS
,
"Add existing block into middle of main chain. Must be passed: "
);
dap_assert_PIF
(
dap_chain_block_test_compare_chain_hash_lists
(
l_chain
,
l_first_branch_atoms_list
),
"Check chain after atoms adding to the main branch "
);
...
...
@@ -134,7 +134,7 @@ void dap_chain_blocks_test()
dap_assert_PIF
(
dap_chain_block_test_compare_chain_hash_lists
(
l_chain
,
l_first_branch_atoms_list
),
"Check branches is not switched: "
);
ret_val
=
l_chain
->
callback_atom_add
(
l_chain
,
(
dap_chain_atom_ptr_t
)
l_block_repeat_first_forked
,
l_block_repeat_first_forked_size
,
&
l_block_repeat_first_forked_hash
);
ret_val
=
l_chain
->
callback_atom_add
(
l_chain
,
(
dap_chain_atom_ptr_t
)
l_block_repeat_first_forked
,
l_block_repeat_first_forked_size
,
&
l_block_repeat_first_forked_hash
,
false
);
dap_assert_PIF
(
ret_val
==
ATOM_PASS
,
"Add existing first forked block into chain. Must be passed: "
);
dap_test_msg
(
"Add third atom to the forked branch..."
);
...
...
@@ -183,7 +183,7 @@ void dap_chain_blocks_test()
dap_assert_PIF
(
dap_chain_block_test_compare_chain_hash_lists
(
l_chain
,
l_third_branch_atoms_list
),
"Check branches is switched: "
);
ret_val
=
l_chain
->
callback_atom_add
(
l_chain
,
(
dap_chain_atom_ptr_t
)
l_block_repeat_middle_forked
,
l_block_repeat_middle_forked_size
,
&
l_block_repeat_middle_forked_hash
);
ret_val
=
l_chain
->
callback_atom_add
(
l_chain
,
(
dap_chain_atom_ptr_t
)
l_block_repeat_middle_forked
,
l_block_repeat_middle_forked_size
,
&
l_block_repeat_middle_forked_hash
,
false
);
dap_assert_PIF
(
ret_val
==
ATOM_PASS
,
"Add existing block into middle of forked chain. Must be passed: "
);
dap_pass_msg
(
"Fork handling test: "
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment