In reply to zz8318:
Why are you calling
wait_cycle(100); // customized task...
What kind of cycles you want to wait?
The test does not know anything about clock cycles. Maybe your test is stucking there.
Do you construct your sequence? This not shown in your code.