My question wasn't about the compiler but the IDE since you could be using Qt Creator to develop your unit test.

That's what I would suggest to test, to see if you obtain there the unit test you want.