const tdm_output_mode *mode = (const tdm_output_mode *)TDM_UT_INVALID_VALUE;
tdm_error ret = tdm_output_get_mode(output, &mode);
- assert(ret == TDM_ERROR_NONE);
- assert(mode != NULL);
- assert(mode->vrefresh > 0);
+ if (ret != TDM_ERROR_NONE) return -1;
+ if (mode == NULL) return -1;
+ if (mode->vrefresh == 0) return -1;
return (double)1.0 / (double)mode->vrefresh;
}
double start, end, interval;
interval = tc_tdm_output_get_vblank_interval_time(outputs[o]);
+ EXPECT_NE(interval, -1);
done1 = false;
start = tdm_helper_get_time();
double start, end, interval;
interval = tc_tdm_output_get_vblank_interval_time(outputs[o]);
+ EXPECT_NE(interval, -1);
done1 = false;
start = tdm_helper_get_time();
double start, end, interval;
interval = tc_tdm_output_get_vblank_interval_time(outputs[o]);
+ EXPECT_NE(interval, -1);
done1 = done2 = done3 = false;
EXPECT_EQ(tdm_output_wait_vblank(outputs[o], t, 0, _tc_tdm_output_done_cb, &done1), TDM_ERROR_NONE);
double start, end, interval;
interval = tc_tdm_output_get_vblank_interval_time(outputs[o]);
+ EXPECT_NE(interval, -1);
done1 = false;
start = tdm_helper_get_time();