07.10.2013 23:27, Thiago Macieira пишет: > On segunda-feira, 7 de outubro de 2013 22:50:49, Dmitry Ashkadov wrote: >> The topic about exceptions for slots and signals has inspirited me to >> pay your attention to QtTest. QtTest is a good unit-test framework, but >> it is focused to Qt. I think QtTest may be used for any project, >> moreover it may be used as unit testing framework for project that >> doesn't use Qt (is not based on Qt). But there is one big thing that is >> not supported by QtTest. Yes, it is exceptions. I think it would be >> better if QtTest has support of exceptions. In QtTest test is >> implemented using slots, so my proposal may require support of exception >> for slots and signals. What do you think about exceptions in QtTest ? > QtTest can test code with exceptions. > > Just make sure that your exceptions don't escape the test slots. That's a > reasonable requirement.
QtTest doesn't provide macro like QVERIFY_EXCEPTION(expression, expected_exception). And any other compare/verify macro should handle exceptions. This will reduce code in test slot. _______________________________________________ Development mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/development
