Commit 2f605b95 authored by Tristan Gingold's avatar Tristan Gingold

unittest: adjust test_msg_time (still not ok).

parent 41d88924
......@@ -356,17 +356,15 @@ static void test_msg_time(CuTest *tc)
CuAssertIntEquals(tc, 0, wrtd_in_trigger_assign(wrtd_1, 1, &tid_2));
CuAssertIntEquals(tc, 0, wrtd_in_trigger_mode_set(wrtd_1, 0, WRTD_TRIGGER_MODE_SINGLE));
CuAssertIntEquals(tc, 0, wrtd_in_trigger_mode_set(wrtd_1, 1, WRTD_TRIGGER_MODE_AUTO));
CuAssertIntEquals(tc, 0, wrtd_in_dead_time_set(wrtd_1, 0, 80 * 1000 * 1000));
CuAssertIntEquals(tc, 0, wrtd_in_dead_time_set(wrtd_1, 1, 80 * 1000 * 1000));
/* Assign trigger output */
CuAssertIntEquals(tc, 0, wrtd_out_trig_assign(wrtd_0, 0, &h_1, &tid_1, NULL));
CuAssertIntEquals(tc, 0, wrtd_out_trig_delay_set(wrtd_0, &h_1, tdelay));
CuAssertIntEquals(tc, 0, wrtd_out_pulse_width_set(wrtd_0, 0, 10 * 1000 * 1000ULL));
CuAssertIntEquals(tc, 0, wrtd_out_trigger_mode_set(wrtd_0, 0, WRTD_TRIGGER_MODE_AUTO));
CuAssertIntEquals(tc, 0, wrtd_in_dead_time_set(wrtd_0, 0, 80000000));
CuAssertIntEquals(tc, 0, wrtd_in_dead_time_set(wrtd_0, 1, 80000000));
/* Enable and Arm */
CuAssertIntEquals(tc, 0, wrtd_out_arm(wrtd_0, 0, 1));
CuAssertIntEquals(tc, 0, wrtd_out_enable(wrtd_0, 0, 1));
......@@ -384,10 +382,10 @@ static void test_msg_time(CuTest *tc)
/* Stop getting pulses from pulse-generator */
CuAssertIntEquals(tc, 0, wrtd_in_enable(wrtd_1, 0, 0));
sleep(1);
sleep(4);
CuAssertIntEquals(tc, 0, wrtd_in_enable(wrtd_1, 1, 0));
CuAssertIntEquals(tc, 0, wrtd_out_enable(wrtd_0, 0, 0));
CuAssertIntEquals(tc, 0, wrtd_out_enable(wrtd_0, 1, 0));
// CuAssertIntEquals(tc, 0, wrtd_out_enable(wrtd_0, 0, 0));
// CuAssertIntEquals(tc, 0, wrtd_out_enable(wrtd_0, 1, 0));
CuAssertIntEquals(tc, 0, wrtd_in_state_get(wrtd_1, 0, &sti1));
CuAssertIntEquals(tc, 0, wrtd_out_state_get(wrtd_0, 0, &sto1));
......@@ -407,7 +405,7 @@ static void test_msg_time(CuTest *tc)
&sto2.last_executed.id,
sizeof(struct wrtd_trig_id)));
CuAssertIntEquals(tc, 0, wrtd_out_trig_unassign(wrtd_0, &h_1));
// CuAssertIntEquals(tc, 0, wrtd_out_trig_unassign(wrtd_0, &h_1));
/* Close */
wrtd_close(wrtd_0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment