smoother_test_SOURCES = tests/smoother-test.c
smoother_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
-smoother_test_CFLAGS = $(AM_CFLAGS)
-smoother_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS)
+smoother_test_CFLAGS = $(AM_CFLAGS) $(LIBCHECK_CFLAGS)
+smoother_test_LDFLAGS = $(AM_LDFLAGS) $(BINLDFLAGS) $(LIBCHECK_LIBS)
proplist_test_SOURCES = tests/proplist-test.c
proplist_test_LDADD = $(AM_LDADD) libpulsecore-@PA_MAJORMINOR@.la libpulse.la libpulsecommon-@PA_MAJORMINOR@.la
#include <stdio.h>
#include <stdlib.h>
+#include <check.h>
+
#include <pulse/timeval.h>
#include <pulsecore/log.h>
#include <pulsecore/time-smoother.h>
-int main(int argc, char*argv[]) {
+START_TEST (smoother_test) {
pa_usec_t x;
unsigned u = 0;
pa_smoother *s;
}
pa_smoother_free(s);
+}
+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 0;
+ return (failed == 0) ? EXIT_SUCCESS : EXIT_FAILURE;
}