Changeset 6c0e4396dfb0205342d19abe777e79a52f6f406b
- Timestamp:
- 04/19/08 14:38:24
(3 months ago)
- Author:
- Rafaël Carré <funman@videolan.org>
- git-committer:
- Rafaël Carré <funman@videolan.org> 1208608704 +0200
- git-parent:
[3181ed58247fa2a9ff2d8fa311313b3451e4a8fc]
- git-author:
- Rafaël Carré <funman@videolan.org> 1208608704 +0200
- Message:
Meta test:
Precise a comment
Wrap a long line
Rework the assertions:
Do it in the right order
Do not put str*cmp-that-could-be-a-ugly-glibc-macro in assert()
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r727f7b3 |
r6c0e439 |
|
| 39 | 39 | catch (); |
|---|
| 40 | 40 | |
|---|
| 41 | | /* Tell that we are interested in this precise meta data */ |
|---|
| | 41 | /* Tell that we are interested in this precise meta data |
|---|
| | 42 | * This is needed to trigger meta data reading |
|---|
| | 43 | * (the first calls return NULL) */ |
|---|
| 42 | 44 | artist = libvlc_media_get_meta (media, libvlc_meta_Artist, &ex); |
|---|
| 43 | 45 | catch (); |
|---|
| … | … | |
| 46 | 48 | |
|---|
| 47 | 49 | /* Wait for the meta */ |
|---|
| 48 | | while (!libvlc_media_is_preparsed (media, &ex)) { catch (); msleep (10000); } |
|---|
| | 50 | while (!libvlc_media_is_preparsed (media, &ex)) |
|---|
| | 51 | { |
|---|
| | 52 | catch (); |
|---|
| | 53 | msleep (10000); |
|---|
| | 54 | } |
|---|
| 49 | 55 | |
|---|
| 50 | 56 | artist = libvlc_media_get_meta (media, libvlc_meta_Artist, &ex); |
|---|
| 51 | 57 | catch (); |
|---|
| 52 | 58 | |
|---|
| 53 | | assert (artist && !strncmp (artist, "mike", 4)); |
|---|
| | 59 | const char *expected_artist = "mike"; |
|---|
| 54 | 60 | |
|---|
| 55 | | log ("+ got '%s' as Artist\n", artist); |
|---|
| | 61 | assert (artist); |
|---|
| | 62 | log ("+ got '%s' as Artist, expecting %s\n", artist, expected_artist); |
|---|
| | 63 | |
|---|
| | 64 | int string_compare = strcmp (artist, expected_artist); |
|---|
| | 65 | assert (!string_compare); |
|---|
| 56 | 66 | |
|---|
| 57 | 67 | free (artist); |
|---|