#define CHECK_ALL_HIGH 1
#define CHECK_HELLO_WORLD 2
-static struct sr_context *sr_ctx;
-
static uint64_t df_packet_counter = 0, sample_counter = 0;
static gboolean have_seen_df_end = FALSE;
static GArray *logic_channellist = NULL;
static uint64_t expected_samples;
static uint64_t *expected_samplerate;
-static void setup(void)
-{
- int ret;
-
- ret = sr_init(&sr_ctx);
- fail_unless(ret == SR_OK, "sr_init() failed: %d.", ret);
-}
-
-static void teardown(void)
-{
- int ret;
-
- ret = sr_exit(sr_ctx);
- fail_unless(ret == SR_OK, "sr_exit() failed: %d.", ret);
-}
-
static void check_all_low(const struct sr_datafeed_logic *logic)
{
uint64_t i;
s = suite_create("input-binary");
tc = tcase_create("basic");
- tcase_add_checked_fixture(tc, setup, teardown);
+ tcase_add_checked_fixture(tc, srtest_setup, srtest_teardown);
tcase_add_test(tc, test_input_binary_all_low);
tcase_add_test(tc, test_input_binary_all_high);
tcase_add_loop_test(tc, test_input_binary_all_high_loop, 0, 10);