Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stefan Strogin
flac
Commits
63da21f4
Commit
63da21f4
authored
Sep 24, 2006
by
Josh Coalson
Browse files
add test for --> MIME type (linked URL)
parent
e6c93ddf
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/test_grabbag/picture/main.c
View file @
63da21f4
...
...
@@ -72,7 +72,7 @@ static FLAC__bool test_one_picture(const char *prefix, const PictureFile *pf, co
printf
(
"testing grabbag__picture_parse_specification(
\"
%s
\"
)... "
,
s
);
if
(
0
==
(
obj
=
grabbag__picture_parse_specification
(
s
,
&
error
)))
return
failed_
(
0
);
return
failed_
(
error
);
if
(
debug_
)
{
printf
(
"
\n
mime_type=%s
\n
description=%s
\n
width=%u
\n
height=%u
\n
depth=%u
\n
colors=%u
\n
data_length=%u
\n
"
,
obj
->
data
.
picture
.
mime_type
,
...
...
@@ -151,6 +151,17 @@ static FLAC__bool do_picture(const char *prefix)
return
failed_
(
"expected error, got object"
);
printf
(
"OK (failed as expected: %s)
\n
"
,
error
);
/* invalid spec: need resolution for linked URL */
printf
(
"testing grabbag__picture_parse_specification(
\"
-->|desc||http://blah.blah.blah/z.gif
\"
)... "
);
if
(
0
!=
(
obj
=
grabbag__picture_parse_specification
(
"-->|desc||http://blah.blah.blah/z.gif"
,
&
error
)))
return
failed_
(
"expected error, got object"
);
printf
(
"OK (failed as expected: %s)
\n
"
,
error
);
printf
(
"testing grabbag__picture_parse_specification(
\"
-->|desc|320x240x9|http://blah.blah.blah/z.gif
\"
)... "
);
if
(
0
==
(
obj
=
grabbag__picture_parse_specification
(
"-->|desc|320x240x9|http://blah.blah.blah/z.gif"
,
&
error
)))
return
failed_
(
error
);
printf
(
"OK
\n
"
);
/* test automatic parsing of picture files to get resolution/color info */
for
(
i
=
0
;
i
<
sizeof
(
picturefiles
)
/
sizeof
(
picturefiles
[
0
]);
i
++
)
if
(
!
test_one_picture
(
prefix
,
picturefiles
+
i
,
""
))
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment