mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-11-10 13:30:05 -05:00
test: fix test and indentation
This commit is contained in:
parent
3eb011c9d1
commit
b0fe422b4f
2 changed files with 7 additions and 3 deletions
|
|
@ -455,9 +455,9 @@ struct pw_stream_events {
|
||||||
void (*trigger_done) (void *data);
|
void (*trigger_done) (void *data);
|
||||||
|
|
||||||
/* notify that a new node linked to the stream, since 1.6.0:3 */
|
/* notify that a new node linked to the stream, since 1.6.0:3 */
|
||||||
void (*peer_added) (void *data, uint32_t id);
|
void (*peer_added) (void *data, uint32_t id);
|
||||||
/* notify that a new node unlinked to the stream, since 1.6.0:3 */
|
/* notify that a new node unlinked to the stream, since 1.6.0:3 */
|
||||||
void (*peer_removed) (void *data, uint32_t id);
|
void (*peer_removed) (void *data, uint32_t id);
|
||||||
};
|
};
|
||||||
|
|
||||||
/** Convert a stream state to a readable string */
|
/** Convert a stream state to a readable string */
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,8 @@ static void test_abi(void)
|
||||||
void (*drained) (void *data);
|
void (*drained) (void *data);
|
||||||
void (*command) (void *data, const struct spa_command *command);
|
void (*command) (void *data, const struct spa_command *command);
|
||||||
void (*trigger_done) (void *data);
|
void (*trigger_done) (void *data);
|
||||||
|
void (*peer_added) (void *data, uint32_t id);
|
||||||
|
void (*peer_removed) (void *data, uint32_t id);
|
||||||
} test = { PW_VERSION_STREAM_EVENTS, NULL };
|
} test = { PW_VERSION_STREAM_EVENTS, NULL };
|
||||||
|
|
||||||
struct pw_stream_events ev;
|
struct pw_stream_events ev;
|
||||||
|
|
@ -45,6 +47,8 @@ static void test_abi(void)
|
||||||
TEST_FUNC(ev, test, drained);
|
TEST_FUNC(ev, test, drained);
|
||||||
TEST_FUNC(ev, test, command);
|
TEST_FUNC(ev, test, command);
|
||||||
TEST_FUNC(ev, test, trigger_done);
|
TEST_FUNC(ev, test, trigger_done);
|
||||||
|
TEST_FUNC(ev, test, peer_added);
|
||||||
|
TEST_FUNC(ev, test, peer_removed);
|
||||||
|
|
||||||
#if defined(__x86_64__) && defined(__LP64__)
|
#if defined(__x86_64__) && defined(__LP64__)
|
||||||
spa_assert_se(sizeof(struct pw_buffer) == 40);
|
spa_assert_se(sizeof(struct pw_buffer) == 40);
|
||||||
|
|
@ -54,7 +58,7 @@ static void test_abi(void)
|
||||||
fprintf(stderr, "%zd\n", sizeof(struct pw_time));
|
fprintf(stderr, "%zd\n", sizeof(struct pw_time));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
spa_assert_se(PW_VERSION_STREAM_EVENTS == 2);
|
spa_assert_se(PW_VERSION_STREAM_EVENTS == 3);
|
||||||
spa_assert_se(sizeof(ev) == sizeof(test));
|
spa_assert_se(sizeof(ev) == sizeof(test));
|
||||||
|
|
||||||
spa_assert_se(PW_STREAM_STATE_ERROR == -1);
|
spa_assert_se(PW_STREAM_STATE_ERROR == -1);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue