mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
tests: modify smoother-test to use 'check' framework
This commit is contained in:
parent
ca5ea07c42
commit
23fac14278
2 changed files with 25 additions and 5 deletions
|
|
@ -476,8 +476,8 @@ remix_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
|
||||||
|
|
||||||
smoother_test_SOURCES = tests/smoother-test.c
|
smoother_test_SOURCES = tests/smoother-test.c
|
||||||
smoother_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
|
smoother_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
|
||||||
smoother_test_CFLAGS = $(AM_CFLAGS)
|
smoother_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
|
||||||
smoother_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
|
smoother_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
|
||||||
|
|
||||||
proplist_test_SOURCES = tests/proplist-test.c
|
proplist_test_SOURCES = tests/proplist-test.c
|
||||||
proplist_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
|
proplist_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
|
||||||
|
|
|
||||||
|
|
@ -24,12 +24,14 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
#include <check.h>
|
||||||
|
|
||||||
#include <pulse/timeval.h>
|
#include <pulse/timeval.h>
|
||||||
|
|
||||||
#include <pulsecore/log.h>
|
#include <pulsecore/log.h>
|
||||||
#include <pulsecore/time-smoother.h>
|
#include <pulsecore/time-smoother.h>
|
||||||
|
|
||||||
int main(int argc, char*argv[]) {
|
START_TEST (smoother_test) {
|
||||||
pa_usec_t x;
|
pa_usec_t x;
|
||||||
unsigned u = 0;
|
unsigned u = 0;
|
||||||
pa_smoother *s;
|
pa_smoother *s;
|
||||||
|
|
@ -80,6 +82,24 @@ int main(int argc, char*argv[]) {
|
||||||
}
|
}
|
||||||
|
|
||||||
pa_smoother_free(s);
|
pa_smoother_free(s);
|
||||||
|
}
|
||||||
return 0;
|
END_TEST
|
||||||
|
|
||||||
|
int main(int argc, char *argv[]) {
|
||||||
|
int failed = 0;
|
||||||
|
Suite *s;
|
||||||
|
TCase *tc;
|
||||||
|
SRunner *sr;
|
||||||
|
|
||||||
|
s = suite_create("Smoother");
|
||||||
|
tc = tcase_create("smoother");
|
||||||
|
tcase_add_test(tc, smoother_test);
|
||||||
|
suite_add_tcase(s, tc);
|
||||||
|
|
||||||
|
sr = srunner_create(s);
|
||||||
|
srunner_run_all(sr, CK_NORMAL);
|
||||||
|
failed = srunner_ntests_failed(sr);
|
||||||
|
srunner_free(sr);
|
||||||
|
|
||||||
|
return (failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue