[Qt-creator] Enhancement Request - File|New Unit Test

Robert Caldecott robert.caldecott at gmail.com
Thu Jul 9 13:01:12 CEST 2009


I am a big fan of unit testing and am always creating new classes that
look like this:

	// footests.h

	#ifndef FOOTESTS_H
	#define FOOTESTS_H

	#include <QTest>

	class FooTests : public QObject
	{
		Q_OBJECT
	private slots:
		void initTestCase();
		void cleanupTestCase();
	};

	#endif // FOOTESTS_H

	// footests.cpp

	#include "footests.h"

	void FooTests::initTestCase()
	{
	}

	void FooTests::cleanupTestCase()
	{
	}

This is quite laborious and as I'm sure most of us agree that unit
testing is a good thing, how about an option in File|New for creating
a unit test class similar to the one above?



More information about the Qt-creator-old mailing list