Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cmp_tool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Dominik Loidolt
cmp_tool
Commits
de667f2b
Commit
de667f2b
authored
2 years ago
by
Dominik Loidolt
Browse files
Options
Downloads
Patches
Plain Diff
remove some memory leaks
parent
86c5b5bd
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!12
increase code coverage, general code refactoring
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
test/cmp_icu/test_cmp_decmp.c
+7
-1
7 additions, 1 deletion
test/cmp_icu/test_cmp_decmp.c
test/cmp_icu/test_cmp_icu.c
+3
-0
3 additions, 0 deletions
test/cmp_icu/test_cmp_icu.c
test/cmp_icu/test_decmp.c
+3
-0
3 additions, 0 deletions
test/cmp_icu/test_decmp.c
with
13 additions
and
1 deletion
test/cmp_icu/test_cmp_decmp.c
+
7
−
1
View file @
de667f2b
...
...
@@ -493,9 +493,14 @@ void compression_decompression(struct cmp_cfg *cfg)
int
data_size
,
cmp_data_size
;
struct
cmp_entity
*
ent
;
void
*
decompressed_data
;
static
void
*
model_of_data
;
static
void
*
model_of_data
=
NULL
;
void
*
updated_model
=
NULL
;
if
(
!
cfg
)
{
free
(
model_of_data
);
return
;
}
TEST_ASSERT_NOT_NULL
(
cfg
);
TEST_ASSERT_NULL
(
cfg
->
icu_output_buf
);
...
...
@@ -611,6 +616,7 @@ void test_random_compression_decompression(void)
free
(
data_to_compress2
);
free
(
updated_model
);
}
compression_decompression
(
NULL
);
}
#define N_SAMPLES 5
...
...
This diff is collapsed.
Click to expand it.
test/cmp_icu/test_cmp_icu.c
+
3
−
0
View file @
de667f2b
...
...
@@ -2740,6 +2740,9 @@ void test_compress_s_fx_raw(void)
TEST_ASSERT_EQUAL_HEX
(
data
[
i
].
exp_flags
,
p
[
i
].
exp_flags
);
TEST_ASSERT_EQUAL_HEX
(
data
[
i
].
fx
,
cpu_to_be32
(
p
[
i
].
fx
));
}
free
(
cfg
.
input_buf
);
free
(
cfg
.
icu_output_buf
);
}
...
...
This diff is collapsed.
Click to expand it.
test/cmp_icu/test_decmp.c
+
3
−
0
View file @
de667f2b
...
...
@@ -437,6 +437,8 @@ void test_cmp_decmp_s_fx_diff(void)
/* if (up_model[i] != de_up_model[i]) */
/* TEST_ASSERT(0); */
/* } */
free
(
ent
);
free
(
decompressed_data
);
}
#undef DATA_SAMPLES
...
...
@@ -629,6 +631,7 @@ void test_s_fx_diff(void)
for
(
i
=
0
;
i
<
s
;
++
i
)
{
TEST_ASSERT_EQUAL
(
result_data
[
i
],
decompressed_data
[
i
]);
}
free
(
decompressed_data
);
}
...
...
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