1
0
mirror of https://gitlab.xiph.org/xiph/ezstream.git synced 2024-12-04 14:46:31 -05:00

Improve test reliability and fix bugs

This commit is contained in:
Moritz Grimm 2020-01-25 01:13:24 +01:00
parent 09b615db0a
commit 97d9949a4b

View File

@ -35,31 +35,31 @@ START_TEST(test_stream)
ck_assert_ptr_ne(stream_get_cfg_intake(s), NULL);
ck_assert_int_ne(stream_configure(s), 0);
cfg_server_set_hostname(srv_cfg, servers, "localhost", NULL);
ck_assert_int_eq(cfg_server_set_hostname(srv_cfg, servers, "localhost", NULL), 0);
ck_assert_int_ne(stream_configure(s), 0);
cfg_server_set_password(srv_cfg, servers, "test", NULL);
ck_assert_int_eq(cfg_server_set_password(srv_cfg, servers, "test", NULL), 0);
ck_assert_int_ne(stream_configure(s), 0);
cfg_server_set_tls(srv_cfg, servers, "required", NULL);
ck_assert_int_eq(cfg_server_set_tls(srv_cfg, servers, "required", NULL), 0);
ck_assert_int_ne(stream_configure(s), 0);
cfg_server_set_tls(srv_cfg, servers, "may", NULL);
ck_assert_int_eq(cfg_server_set_tls(srv_cfg, servers, "may", NULL), 0);
ck_assert_int_ne(stream_configure(s), 0);
cfg_server_set_tls(srv_cfg, servers, "none", NULL);
ck_assert_int_eq(cfg_server_set_tls(srv_cfg, servers, "none", NULL), 0);
ck_assert_int_ne(stream_configure(s), 0);
cfg_stream_set_mountpoint(str_cfg, streams, "/test.ogg", NULL);
ck_assert_int_eq(cfg_stream_set_mountpoint(str_cfg, streams, "/test.ogg", NULL), 0);
ck_assert_int_ne(stream_configure(s), 0);
cfg_stream_set_format(str_cfg, streams, "mp3", NULL);
ck_assert_int_eq(cfg_stream_set_format(str_cfg, streams, "mp3", NULL), 0);
ck_assert_int_eq(stream_configure(s), 0);
cfg_stream_set_format(str_cfg, streams, "vorbis", NULL);
ck_assert_int_eq(cfg_stream_set_format(str_cfg, streams, "ogg", NULL), 0);
ck_assert_int_eq(stream_configure(s), 0);
cfg_stream_set_stream_name(str_cfg, streams, "test", NULL);
cfg_stream_set_stream_url(str_cfg, streams, "test", NULL);
cfg_stream_set_stream_genre(str_cfg, streams, "test", NULL);
cfg_stream_set_stream_description(str_cfg, streams, "test", NULL);
cfg_stream_set_stream_quality(str_cfg, streams, "test", NULL);
cfg_stream_set_stream_bitrate(str_cfg, streams, "test", NULL);
cfg_stream_set_stream_samplerate(str_cfg, streams, "test", NULL);
cfg_stream_set_stream_channels(str_cfg, streams, "test", NULL);
cfg_stream_set_public(str_cfg, streams, "test", NULL);
ck_assert_int_eq(cfg_stream_set_stream_name(str_cfg, streams, "test", NULL), 0);
ck_assert_int_eq(cfg_stream_set_stream_url(str_cfg, streams, "test", NULL), 0);
ck_assert_int_eq(cfg_stream_set_stream_genre(str_cfg, streams, "test", NULL), 0);
ck_assert_int_eq(cfg_stream_set_stream_description(str_cfg, streams, "test", NULL), 0);
ck_assert_int_eq(cfg_stream_set_stream_quality(str_cfg, streams, "test", NULL), 0);
ck_assert_int_eq(cfg_stream_set_stream_bitrate(str_cfg, streams, "test", NULL), 0);
ck_assert_int_eq(cfg_stream_set_stream_samplerate(str_cfg, streams, "test", NULL), 0);
ck_assert_int_eq(cfg_stream_set_stream_channels(str_cfg, streams, "test", NULL), 0);
ck_assert_int_eq(cfg_stream_set_public(str_cfg, streams, "true", NULL), 0);
ck_assert_int_eq(stream_configure(s), 0);
ck_assert_int_eq(stream_get_connected(s), 0);