Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
libdvbpsi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
libdvbpsi
Commits
549a6515
Commit
549a6515
authored
Jun 28, 2015
by
Daniel Kamil Kozar
Committed by
Jean-Paul Saman
Jan 12, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add two testcases for service descriptor
Signed-off-by:
Jean-Paul Saman
<
jpsaman@videolan.org
>
parent
742f05eb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
9 deletions
+55
-9
misc/dr.xml
misc/dr.xml
+9
-3
misc/test_dr.c
misc/test_dr.c
+46
-6
No files found.
misc/dr.xml
View file @
549a6515
...
...
@@ -138,16 +138,22 @@
<array
name=
"i_char"
len_name=
"i_name_length"
min_size=
"0"
/>
</descriptor>
<descriptor
name=
"service
"
sname=
"service"
fname=
"Service
"
>
<descriptor
name=
"service
(i_service_provider_name)"
sname=
"service"
fname=
"Service"
msuffix=
"1
"
>
<insert>
<begin>
s_decoded.i_service_
provider_
name_length = 0;
</begin>
s_decoded.i_service_name_length = 0;
</begin>
</insert>
<integer
name=
"i_service_type"
bitcount=
"8"
default=
"0"
/>
<array
name=
"i_service_provider_name"
len_name=
"i_service_provider_name_length"
min_size=
"0"
/>
</descriptor>
<descriptor
name=
"service (i_service_name)"
sname=
"service"
fname=
"Service"
msuffix=
"2"
>
<insert>
<begin>
s_decoded.i_service_name_length = 0;
</begin>
s_decoded.i_service_
provider_
name_length = 0;
</begin>
</insert>
<integer
name=
"i_service_type"
bitcount=
"8"
default=
"0"
/>
<array
name=
"i_service_name"
len_name=
"i_service_name_length"
min_size=
"0"
/>
</descriptor>
</dr>
misc/test_dr.c
View file @
549a6515
...
...
@@ -852,15 +852,14 @@ static int main_bouquet_name_(void)
return
i_err
;
}
/* service */
static
int
main_service_
(
void
)
/* service
(i_service_provider_name)
*/
static
int
main_service_
1
(
void
)
{
BOZO_VARS
(
service
);
BOZO_START
(
service
);
BOZO_START
(
service
(
i_service_provider_name
)
);
/* check i_service_type */
s_decoded
.
i_service_provider_name_length
=
0
;
s_decoded
.
i_service_name_length
=
0
;
BOZO_init_integer
(
i_service_type
,
0
);
BOZO_begin_integer
(
i_service_type
,
8
)
...
...
@@ -869,8 +868,48 @@ static int main_service_(void)
BOZO_CLEAN
();
BOZO_end_integer
(
i_service_type
,
8
)
/* check i_service_provider_name */
s_decoded
.
i_service_name_length
=
0
;
BOZO_init_integer
(
i_service_type
,
0
);
BOZO_begin_array
(
i_service_provider_name
,
i_service_provider_name_length
,
0
)
BOZO_DOJOB
(
Service
);
BOZO_check_array
(
i_service_provider_name
,
i_service_provider_name_length
)
BOZO_CLEAN
();
BOZO_end_array
(
i_service_provider_name
)
BOZO_END
(
service
(
i_service_provider_name
));
return
i_err
;
}
/* service (i_service_name) */
static
int
main_service_2
(
void
)
{
BOZO_VARS
(
service
);
BOZO_START
(
service
(
i_service_name
));
/* check i_service_type */
s_decoded
.
i_service_provider_name_length
=
0
;
BOZO_init_integer
(
i_service_type
,
0
);
BOZO_begin_integer
(
i_service_type
,
8
)
BOZO_DOJOB
(
Service
);
BOZO_check_integer
(
i_service_type
,
8
)
BOZO_CLEAN
();
BOZO_end_integer
(
i_service_type
,
8
)
/* check i_service_name */
s_decoded
.
i_service_provider_name_length
=
0
;
BOZO_init_integer
(
i_service_type
,
0
);
BOZO_begin_array
(
i_service_name
,
i_service_name_length
,
0
)
BOZO_DOJOB
(
Service
);
BOZO_check_array
(
i_service_name
,
i_service_name_length
)
BOZO_CLEAN
();
BOZO_end_array
(
i_service_name
)
BOZO_END
(
service
);
BOZO_END
(
service
(
i_service_name
)
);
return
i_err
;
}
...
...
@@ -904,7 +943,8 @@ int main(void)
i_err
|=
main_mpeg4_audio_
();
i_err
|=
main_stuffing_
();
i_err
|=
main_bouquet_name_
();
i_err
|=
main_service_
();
i_err
|=
main_service_1
();
i_err
|=
main_service_2
();
if
(
i_err
)
fprintf
(
stderr
,
"At least one test has FAILED !!!
\n
"
);
...
...
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