Hi,
Sorry, but there's a bunch of issues I need to point out. Of course we could address them later, but it'll mean rewriting a bunch of code, and I'd like to have it correct from the beginning. In general, I think this implementation limits us too much.
For example, I don't think it's a good idea to have the TASKDIALOGCONFIG structure being filled in run_test_, we need to be able to control it easily.
Second, we also need to be able to return different values in the callback, the current approach doesn't account for that.
And the most important part, the separation from messages to send and received messages to test against. It's better to send the next message only when the last message arrived, to make sure we process them in the correct order. I attached a patch to show the problem (apply on top of my in-review patch). When sending all messages together, the first message is skipped, and we don't want that to happen.
Please reconsider my approach, I can try to simplify it if you want, but I think the complexity is justified to solve a complicated problem.
Regards, Fabian Maurer