Skip to content
Permalink
Browse files

test builder now makes additions to makefile properly

Added testqgsfield which has no tests in it yet



git-svn-id: http://svn.osgeo.org/qgis/trunk@5222 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
timlinux
timlinux committed Apr 8, 2006
1 parent e299757 commit 63df8997f996ad8b169a29ff811431cae7267102
Showing with 35 additions and 12 deletions.
  1. +7 −0 tests/src/core/Makefile.am
  2. +9 −12 tests/src/core/test_builder.pl
  3. +19 −0 tests/src/core/testqgsfield.cpp
@@ -9,6 +9,7 @@
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

bin_PROGRAMS = testqgsapplication \
testqgsfield \
testqgssymbol

#
@@ -26,6 +27,7 @@ GLOBALCXXFLAGS = $(CXXFLAGS) $(EXTRA_CXXFLAGS) $(GDAL_CFLAGS) $(QT_CXXFLAGS) $(P
$(MOC) -o $@ $<

BUILT_SOURCES = $(testqgsapplication_MOC) \
$(testqgsfield_MOC) \
$(testqgssymbol_MOC)

CLEANFILES = $(BUILT_SOURCES)
@@ -44,3 +46,8 @@ testqgssymbol_MOC = testqgssymbol.moc.cpp
testqgssymbol_SOURCES = testqgssymbol.cpp
testqgssymbol_LDADD = $(GLOBALLDADD)
testqgssymbol_CXXFLAGS = $(GLOBALCXXFLAGS)

testqgsfield_MOC = testqgsfield.moc.cpp
testqgsfield_SOURCES = testqgsfield.cpp
testqgsfield_LDADD = $(GLOBALLDADD)
testqgsfield_CXXFLAGS = $(GLOBALCXXFLAGS)
@@ -57,29 +57,26 @@
if(/^\s*bin_PROGRAMS =*/)
{
# add our application binary name to the next line
print MAKEFILEMOD "\\";
print MAKEFILEMOD "\t\t$testClassLowerCaseName \n";
}
else
{
print MAKEFILEMOD;
print MAKEFILEMOD "\t\ttest$testClassLowerCaseName \\\n";
}
if(/^\s*BUILT_SOURCES =*/)
elsif(/^\s*BUILT_SOURCES =*/)
{
# add our application binary name to the next line
print MAKEFILEMOD "\\";
print MAKEFILEMOD "\t\t${testClassLowerCaseName}_MOC \n";
print MAKEFILEMOD;
print MAKEFILEMOD "\t\t\$(test${testClassLowerCaseName}_MOC) \\\n";
}
else
{
print MAKEFILEMOD;
}
}
#before closing the file add the lines for our new test class
print MAKEFILEMOD "test${testClassLowerCaseName}_MOC = test${testClassLowerCaseName}.moc.cpp";
print MAKEFILEMOD "test${testClassLowerCaseName}_SOURCES = ${testClassLowerCaseName}.cpp";
print MAKEFILEMOD "test${testClassLowerCaseName}_LDADD = $(GLOBALLDADD)";
print MAKEFILEMOD "test${testClassLowerCaseName}_CXXFLAGS = $(GLOBALCXXFLAGS)";
print MAKEFILEMOD "\n";
print MAKEFILEMOD "test${testClassLowerCaseName}_MOC = test${testClassLowerCaseName}.moc.cpp\n";
print MAKEFILEMOD "test${testClassLowerCaseName}_SOURCES = test${testClassLowerCaseName}.cpp\n";
print MAKEFILEMOD "test${testClassLowerCaseName}_LDADD = \$(GLOBALLDADD)\n";
print MAKEFILEMOD "test${testClassLowerCaseName}_CXXFLAGS = \$(GLOBALCXXFLAGS)\n";

# close the Makefile file handles
close MAKEFILEMOD;
@@ -0,0 +1,19 @@
#include <QtTest>
#include <QObject>
#include <QString>
#include <QObject>
//header for class being tested
#include <qgsfield.h>

class TestQgsField: public QObject
{
Q_OBJECT;
private slots:
};

QTEST_MAIN(TestQgsField)
#include "testqgsfield.moc.cpp"




0 comments on commit 63df899

Please sign in to comment.
You can’t perform that action at this time.