http://code.google.com/p/gtest-runner-qt/source/detail?r=16
Added:
/trunk/include/GTestSuite.h
/trunk/src/GTestSuite.cpp
Deleted:
/trunk/include/GTestCase.h
/trunk/src/GTestCase.cpp
Modified:
/trunk/GTestRunner.pro
/trunk/Makefile
/trunk/Makefile.Debug
/trunk/Makefile.Release
/trunk/include/GTestExecutable.h
/trunk/include/GTestExecutableResults.h
/trunk/src/GTestExecutable.cpp
/trunk/src/GTestRunner.cpp
=======================================
--- /dev/null
+++ /trunk/include/GTestSuite.h Tue Jul 27 15:12:07 2010
@@ -0,0 +1,61 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * *
+ * GTestSuite.h - Created on
2010-07-25 *
+
*
*
+ * Copyright (C) 2010 Sandy
Chapman *
+
*
*
+ * This library is free software; you can redistribute it and/or modify it
under the *
+ * terms of the GNU Lesser General Public License as published by the Free
Software *
+ * Foundation; either version 2.1 of the License, or (at your option) any
later version. *
+ * This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; *
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. *
+ * See the GNU Lesser General Public License for more
details. *
+ * You should have received a copy of the GNU Lesser General Public
License along with this *
+ * library; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, *
+ * Boston, MA 02111-1307
USA *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * */
+
+#ifndef GTESTFIXTURE_H_
+#define GTESTFIXTURE_H_
+
+#include <QList>
+#include <QMetaType>
+#include <QObject>
+
+#include "GTest.h"
+
+class GTestSuite : public QObject {
+
+Q_OBJECT
+
+private:
+ QString name;
+ QList<GTest*> runList;
+
+signals:
+ void requestRun(QString caseName, QString testName);
+ void resultsReceived();
+
+public slots:
+ void receiveRunRequest(QString testName);
+
+public:
+ GTestSuite(QString name);
+ void addTest(GTest* test);
+ void removeTest(GTest* test);
+ void run();
+
+};
+
+Q_DECLARE_METATYPE(GTestSuite*);
+
+inline void GTestSuite::addTest(GTest* test) {
+ QObject::connect(test, SIGNAL(requestRun(QString)),
+ this, SLOT(receiveRunRequest(QString)));
+}
+
+inline void GTestSuite::removeTest(GTest* test) {
+ QObject::disconnect(test, SIGNAL(requestRun(QString)),
+ this, SLOT(receiveRunRequest(QString)));
+}
+
+#endif /* GTESTFIXTURE_H_ */
=======================================
--- /dev/null
+++ /trunk/src/GTestSuite.cpp Tue Jul 27 15:12:07 2010
@@ -0,0 +1,26 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * *
+ * GTestSuite.cpp - Created on 2010-07-25
+ *
+ * Copyright (C) 2010 Sandy Chapman
+ *
+ * This library is free software; you can redistribute it and/or modify it
under the
+ * terms of the GNU Lesser General Public License as published by the Free
Software
+ * Foundation; either version 2.1 of the License, or (at your option) any
later version.
+ * This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY;
+ * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
+ * See the GNU Lesser General Public License for more details.
+ * You should have received a copy of the GNU Lesser General Public
License along with this
+ * library; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330,
+ * Boston, MA 02111-1307 USA
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * */
+
+#include "GTestSuite.h"
+
+GTestSuite::GTestSuite(QString name)
+: name(name), runList()
+{}
+
+void GTestSuite::receiveRunRequest(QString testName) {
+ runList.append((GTest*)QObject::sender());
+ emit requestRun(name, testName);
+}
=======================================
--- /trunk/include/GTestCase.h Mon Jul 26 15:58:53 2010
+++ /dev/null
@@ -1,61 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * *
- * GTestCase.h - Created on
2010-07-25 *
-
*
*
- * Copyright (C) 2010 Sandy
Chapman *
-
*
*
- * This library is free software; you can redistribute it and/or modify it
under the *
- * terms of the GNU Lesser General Public License as published by the Free
Software *
- * Foundation; either version 2.1 of the License, or (at your option) any
later version. *
- * This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; *
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE. *
- * See the GNU Lesser General Public License for more
details. *
- * You should have received a copy of the GNU Lesser General Public
License along with this *
- * library; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330, *
- * Boston, MA 02111-1307
USA *
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * */
-
-#ifndef GTESTFIXTURE_H_
-#define GTESTFIXTURE_H_
-
-#include <QList>
-#include <QMetaType>
-#include <QObject>
-
-#include "GTest.h"
-
-class GTestCase : public QObject {
-
-Q_OBJECT
-
-private:
- QString name;
- QList<GTest*> runList;
-
-signals:
- void requestRun(QString caseName, QString testName);
- void resultsReceived();
-
-public slots:
- void receiveRunRequest(QString testName);
-
-public:
- GTestCase(QString name);
- void addTest(GTest* test);
- void removeTest(GTest* test);
- void run();
-
-};
-
-Q_DECLARE_METATYPE(GTestCase*);
-
-inline void GTestCase::addTest(GTest* test) {
- QObject::connect(test, SIGNAL(requestRun(QString)),
- this, SLOT(receiveRunRequest(QString)));
-}
-
-inline void GTestCase::removeTest(GTest* test) {
- QObject::disconnect(test, SIGNAL(requestRun(QString)),
- this, SLOT(receiveRunRequest(QString)));
-}
-
-#endif /* GTESTFIXTURE_H_ */
=======================================
--- /trunk/src/GTestCase.cpp Mon Jul 26 15:58:53 2010
+++ /dev/null
@@ -1,26 +0,0 @@
-/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * *
- * GTestCase.cpp - Created on 2010-07-25
- *
- * Copyright (C) 2010 Sandy Chapman
- *
- * This library is free software; you can redistribute it and/or modify it
under the
- * terms of the GNU Lesser General Public License as published by the Free
Software
- * Foundation; either version 2.1 of the License, or (at your option) any
later version.
- * This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY;
- * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
- * See the GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public
License along with this
- * library; if not, write to the Free Software Foundation, Inc., 59 Temple
Place, Suite 330,
- * Boston, MA 02111-1307 USA
- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * */
-
-#include "GTestCase.h"
-
-GTestCase::GTestCase(QString name)
-: name(name), runList()
-{}
-
-void GTestCase::receiveRunRequest(QString testName) {
- runList.append((GTest*)QObject::sender());
- emit requestRun(name, testName);
-}
=======================================
--- /trunk/GTestRunner.pro Mon Jul 26 15:58:53 2010
+++ /trunk/GTestRunner.pro Tue Jul 27 15:12:07 2010
@@ -2,15 +2,15 @@
TARGET = GTestRunner
QT += core \
gui
-HEADERS += include/Defines.h \
+HEADERS += include/GTestSuite.h \
+ include/Defines.h \
include/GTestExecutableResults.h \
- include/GTestCase.h \
include/GTest.h \
include/GTestExecutable.h \
include/GTestParser.h \
include/GTestRunner.h
-SOURCES += src/GTestExecutableResults.cpp \
- src/GTestCase.cpp \
+SOURCES += src/GTestSuite.cpp \
+ src/GTestExecutableResults.cpp \
src/GTest.cpp \
src/GTestExecutable.cpp \
main.cpp \
=======================================
--- /trunk/Makefile Mon Jul 26 15:58:53 2010
+++ /trunk/Makefile Tue Jul 27 15:12:07 2010
@@ -1,6 +1,6 @@
#############################################################################
# Makefile for building: GTestRunner
-# Generated by qmake (2.01a) (Qt 4.6.2) on: Mon Jul 26 19:53:09 2010
+# Generated by qmake (2.01a) (Qt 4.6.2) on: Tue Jul 27 19:11:00 2010
# Project: GTestRunner.pro
# Template: app
# Command: /usr/local/Trolltech/Qt-4.6.2/bin/qmake -unix
CONFIG+=debug_and_release -o Makefile GTestRunner.pro
=======================================
--- /trunk/Makefile.Debug Mon Jul 26 15:58:53 2010
+++ /trunk/Makefile.Debug Tue Jul 27 15:12:07 2010
@@ -1,6 +1,6 @@
#############################################################################
# Makefile for building: GTestRunner
-# Generated by qmake (2.01a) (Qt 4.6.2) on: Mon Jul 26 19:53:09 2010
+# Generated by qmake (2.01a) (Qt 4.6.2) on: Tue Jul 27 19:11:00 2010
# Project: GTestRunner.pro
# Template: app
#############################################################################
@@ -42,24 +42,24 @@
####### Files
-SOURCES = src/GTestExecutableResults.cpp \
- src/GTestCase.cpp \
+SOURCES = src/GTestSuite.cpp \
+ src/GTestExecutableResults.cpp \
src/GTest.cpp \
src/GTestExecutable.cpp \
main.cpp \
src/GTestParser.cpp \
- src/GTestRunner.cpp debug/moc_GTestCase.cpp \
+ src/GTestRunner.cpp debug/moc_GTestSuite.cpp \
debug/moc_GTest.cpp \
debug/moc_GTestExecutable.cpp \
debug/moc_GTestRunner.cpp
-OBJECTS = debug/GTestExecutableResults.o \
- debug/GTestCase.o \
+OBJECTS = debug/GTestSuite.o \
+ debug/GTestExecutableResults.o \
debug/GTest.o \
debug/GTestExecutable.o \
debug/main.o \
debug/GTestParser.o \
debug/GTestRunner.o \
- debug/moc_GTestCase.o \
+ debug/moc_GTestSuite.o \
debug/moc_GTest.o \
debug/moc_GTestExecutable.o \
debug/moc_GTestRunner.o
@@ -121,7 +121,7 @@
dist:
@$(CHK_DIR_EXISTS) debug/GTestRunner1.0.0 || $(MKDIR)
debug/GTestRunner1.0.0
- $(COPY_FILE) --parents $(SOURCES) $(DIST) debug/GTestRunner1.0.0/ &&
$(COPY_FILE) --parents include/Defines.h include/GTestExecutableResults.h
include/GTestCase.h include/GTest.h include/GTestExecutable.h
include/GTestParser.h include/GTestRunner.h debug/GTestRunner1.0.0/ &&
$(COPY_FILE) --parents src/GTestExecutableResults.cpp src/GTestCase.cpp
src/GTest.cpp src/GTestExecutable.cpp main.cpp src/GTestParser.cpp
src/GTestRunner.cpp debug/GTestRunner1.0.0/ && (cd `dirname
debug/GTestRunner1.0.0` && $(TAR) GTestRunner1.0.0.tar GTestRunner1.0.0 &&
$(COMPRESS) GTestRunner1.0.0.tar) && $(MOVE) `dirname
debug/GTestRunner1.0.0`/GTestRunner1.0.0.tar.gz . && $(DEL_FILE) -r
debug/GTestRunner1.0.0
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) debug/GTestRunner1.0.0/ &&
$(COPY_FILE) --parents include/GTestSuite.h include/Defines.h
include/GTestExecutableResults.h include/GTest.h include/GTestExecutable.h
include/GTestParser.h include/GTestRunner.h debug/GTestRunner1.0.0/ &&
$(COPY_FILE) --parents src/GTestSuite.cpp src/GTestExecutableResults.cpp
src/GTest.cpp src/GTestExecutable.cpp main.cpp src/GTestParser.cpp
src/GTestRunner.cpp debug/GTestRunner1.0.0/ && (cd `dirname
debug/GTestRunner1.0.0` && $(TAR) GTestRunner1.0.0.tar GTestRunner1.0.0 &&
$(COMPRESS) GTestRunner1.0.0.tar) && $(MOVE) `dirname
debug/GTestRunner1.0.0`/GTestRunner1.0.0.tar.gz . && $(DEL_FILE) -r
debug/GTestRunner1.0.0
clean:compiler_clean
@@ -140,24 +140,20 @@
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
-compiler_moc_header_make_all: debug/moc_GTestCase.cpp debug/moc_GTest.cpp
debug/moc_GTestExecutable.cpp debug/moc_GTestRunner.cpp
+compiler_moc_header_make_all: debug/moc_GTestSuite.cpp debug/moc_GTest.cpp
debug/moc_GTestExecutable.cpp debug/moc_GTestRunner.cpp
compiler_moc_header_clean:
- -$(DEL_FILE) debug/moc_GTestCase.cpp debug/moc_GTest.cpp
debug/moc_GTestExecutable.cpp debug/moc_GTestRunner.cpp
-debug/moc_GTestCase.cpp: include/GTest.h \
- include/GTestCase.h
- /usr/local/Trolltech/Qt-4.6.2/bin/moc $(DEFINES) $(INCPATH)
include/GTestCase.h -o debug/moc_GTestCase.cpp
+ -$(DEL_FILE) debug/moc_GTestSuite.cpp debug/moc_GTest.cpp
debug/moc_GTestExecutable.cpp debug/moc_GTestRunner.cpp
+debug/moc_GTestSuite.cpp: include/GTest.h \
+ include/GTestSuite.h
+ /usr/local/Trolltech/Qt-4.6.2/bin/moc $(DEFINES) $(INCPATH)
include/GTestSuite.h -o debug/moc_GTestSuite.cpp
debug/moc_GTest.cpp: include/GTest.h
/usr/local/Trolltech/Qt-4.6.2/bin/moc $(DEFINES) $(INCPATH)
include/GTest.h -o debug/moc_GTest.cpp
-debug/moc_GTestExecutable.cpp: include/GTestCase.h \
- include/GTest.h \
- include/GTestExecutable.h
+debug/moc_GTestExecutable.cpp: include/GTestExecutable.h
/usr/local/Trolltech/Qt-4.6.2/bin/moc $(DEFINES) $(INCPATH)
include/GTestExecutable.h -o debug/moc_GTestExecutable.cpp
debug/moc_GTestRunner.cpp: include/GTestExecutable.h \
- include/GTestCase.h \
- include/GTest.h \
include/GTestRunner.h
/usr/local/Trolltech/Qt-4.6.2/bin/moc $(DEFINES) $(INCPATH)
include/GTestRunner.h -o debug/moc_GTestRunner.cpp
@@ -180,12 +176,12 @@
####### Compile
+debug/GTestSuite.o: src/GTestSuite.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/GTestSuite.o src/GTestSuite.cpp
+
debug/GTestExecutableResults.o: src/GTestExecutableResults.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/GTestExecutableResults.o
src/GTestExecutableResults.cpp
-debug/GTestCase.o: src/GTestCase.cpp
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/GTestCase.o src/GTestCase.cpp
-
debug/GTest.o: src/GTest.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/GTest.o src/GTest.cpp
@@ -201,8 +197,8 @@
debug/GTestRunner.o: src/GTestRunner.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/GTestRunner.o
src/GTestRunner.cpp
-debug/moc_GTestCase.o: debug/moc_GTestCase.cpp
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/moc_GTestCase.o
debug/moc_GTestCase.cpp
+debug/moc_GTestSuite.o: debug/moc_GTestSuite.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/moc_GTestSuite.o
debug/moc_GTestSuite.cpp
debug/moc_GTest.o: debug/moc_GTest.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o debug/moc_GTest.o debug/moc_GTest.cpp
=======================================
--- /trunk/Makefile.Release Mon Jul 26 15:58:53 2010
+++ /trunk/Makefile.Release Tue Jul 27 15:12:07 2010
@@ -1,6 +1,6 @@
#############################################################################
# Makefile for building: GTestRunner
-# Generated by qmake (2.01a) (Qt 4.6.2) on: Mon Jul 26 19:53:09 2010
+# Generated by qmake (2.01a) (Qt 4.6.2) on: Tue Jul 27 19:11:00 2010
# Project: GTestRunner.pro
# Template: app
#############################################################################
@@ -42,24 +42,24 @@
####### Files
-SOURCES = src/GTestExecutableResults.cpp \
- src/GTestCase.cpp \
+SOURCES = src/GTestSuite.cpp \
+ src/GTestExecutableResults.cpp \
src/GTest.cpp \
src/GTestExecutable.cpp \
main.cpp \
src/GTestParser.cpp \
- src/GTestRunner.cpp release/moc_GTestCase.cpp \
+ src/GTestRunner.cpp release/moc_GTestSuite.cpp \
release/moc_GTest.cpp \
release/moc_GTestExecutable.cpp \
release/moc_GTestRunner.cpp
-OBJECTS = release/GTestExecutableResults.o \
- release/GTestCase.o \
+OBJECTS = release/GTestSuite.o \
+ release/GTestExecutableResults.o \
release/GTest.o \
release/GTestExecutable.o \
release/main.o \
release/GTestParser.o \
release/GTestRunner.o \
- release/moc_GTestCase.o \
+ release/moc_GTestSuite.o \
release/moc_GTest.o \
release/moc_GTestExecutable.o \
release/moc_GTestRunner.o
@@ -121,7 +121,7 @@
dist:
@$(CHK_DIR_EXISTS) release/GTestRunner1.0.0 || $(MKDIR)
release/GTestRunner1.0.0
- $(COPY_FILE) --parents $(SOURCES) $(DIST) release/GTestRunner1.0.0/ &&
$(COPY_FILE) --parents include/Defines.h include/GTestExecutableResults.h
include/GTestCase.h include/GTest.h include/GTestExecutable.h
include/GTestParser.h include/GTestRunner.h release/GTestRunner1.0.0/ &&
$(COPY_FILE) --parents src/GTestExecutableResults.cpp src/GTestCase.cpp
src/GTest.cpp src/GTestExecutable.cpp main.cpp src/GTestParser.cpp
src/GTestRunner.cpp release/GTestRunner1.0.0/ && (cd `dirname
release/GTestRunner1.0.0` && $(TAR) GTestRunner1.0.0.tar GTestRunner1.0.0
&& $(COMPRESS) GTestRunner1.0.0.tar) && $(MOVE) `dirname
release/GTestRunner1.0.0`/GTestRunner1.0.0.tar.gz . && $(DEL_FILE) -r
release/GTestRunner1.0.0
+ $(COPY_FILE) --parents $(SOURCES) $(DIST) release/GTestRunner1.0.0/ &&
$(COPY_FILE) --parents include/GTestSuite.h include/Defines.h
include/GTestExecutableResults.h include/GTest.h include/GTestExecutable.h
include/GTestParser.h include/GTestRunner.h release/GTestRunner1.0.0/ &&
$(COPY_FILE) --parents src/GTestSuite.cpp src/GTestExecutableResults.cpp
src/GTest.cpp src/GTestExecutable.cpp main.cpp src/GTestParser.cpp
src/GTestRunner.cpp release/GTestRunner1.0.0/ && (cd `dirname
release/GTestRunner1.0.0` && $(TAR) GTestRunner1.0.0.tar GTestRunner1.0.0
&& $(COMPRESS) GTestRunner1.0.0.tar) && $(MOVE) `dirname
release/GTestRunner1.0.0`/GTestRunner1.0.0.tar.gz . && $(DEL_FILE) -r
release/GTestRunner1.0.0
clean:compiler_clean
@@ -140,24 +140,20 @@
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
-compiler_moc_header_make_all: release/moc_GTestCase.cpp
release/moc_GTest.cpp release/moc_GTestExecutable.cpp
release/moc_GTestRunner.cpp
+compiler_moc_header_make_all: release/moc_GTestSuite.cpp
release/moc_GTest.cpp release/moc_GTestExecutable.cpp
release/moc_GTestRunner.cpp
compiler_moc_header_clean:
- -$(DEL_FILE) release/moc_GTestCase.cpp release/moc_GTest.cpp
release/moc_GTestExecutable.cpp release/moc_GTestRunner.cpp
-release/moc_GTestCase.cpp: include/GTest.h \
- include/GTestCase.h
- /usr/local/Trolltech/Qt-4.6.2/bin/moc $(DEFINES) $(INCPATH)
include/GTestCase.h -o release/moc_GTestCase.cpp
+ -$(DEL_FILE) release/moc_GTestSuite.cpp release/moc_GTest.cpp
release/moc_GTestExecutable.cpp release/moc_GTestRunner.cpp
+release/moc_GTestSuite.cpp: include/GTest.h \
+ include/GTestSuite.h
+ /usr/local/Trolltech/Qt-4.6.2/bin/moc $(DEFINES) $(INCPATH)
include/GTestSuite.h -o release/moc_GTestSuite.cpp
release/moc_GTest.cpp: include/GTest.h
/usr/local/Trolltech/Qt-4.6.2/bin/moc $(DEFINES) $(INCPATH)
include/GTest.h -o release/moc_GTest.cpp
-release/moc_GTestExecutable.cpp: include/GTestCase.h \
- include/GTest.h \
- include/GTestExecutable.h
+release/moc_GTestExecutable.cpp: include/GTestExecutable.h
/usr/local/Trolltech/Qt-4.6.2/bin/moc $(DEFINES) $(INCPATH)
include/GTestExecutable.h -o release/moc_GTestExecutable.cpp
release/moc_GTestRunner.cpp: include/GTestExecutable.h \
- include/GTestCase.h \
- include/GTest.h \
include/GTestRunner.h
/usr/local/Trolltech/Qt-4.6.2/bin/moc $(DEFINES) $(INCPATH)
include/GTestRunner.h -o release/moc_GTestRunner.cpp
@@ -180,12 +176,12 @@
####### Compile
+release/GTestSuite.o: src/GTestSuite.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/GTestSuite.o
src/GTestSuite.cpp
+
release/GTestExecutableResults.o: src/GTestExecutableResults.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/GTestExecutableResults.o
src/GTestExecutableResults.cpp
-release/GTestCase.o: src/GTestCase.cpp
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/GTestCase.o src/GTestCase.cpp
-
release/GTest.o: src/GTest.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/GTest.o src/GTest.cpp
@@ -201,8 +197,8 @@
release/GTestRunner.o: src/GTestRunner.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/GTestRunner.o
src/GTestRunner.cpp
-release/moc_GTestCase.o: release/moc_GTestCase.cpp
- $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/moc_GTestCase.o
release/moc_GTestCase.cpp
+release/moc_GTestSuite.o: release/moc_GTestSuite.cpp
+ $(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/moc_GTestSuite.o
release/moc_GTestSuite.cpp
release/moc_GTest.o: release/moc_GTest.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/moc_GTest.o
release/moc_GTest.cpp
=======================================
--- /trunk/include/GTestExecutable.h Mon Jul 26 15:58:53 2010
+++ /trunk/include/GTestExecutable.h Tue Jul 27 15:12:07 2010
@@ -23,7 +23,7 @@
#include <QMetaType>
#include <QMutex>
-#include "GTestCase.h"
+#include "GTestSuite.h"
class GTestExecutable : public QObject {
@@ -45,7 +45,7 @@
QBuffer standardOutput;
QBuffer standardError;
QStringList listing;
- QList<GTestCase*> runList;
+ QList<GTestSuite*> runList;
QStringList testsToRun;
bool runOnSignal;
@@ -90,8 +90,8 @@
//METHODS:
void produceListing();
- void addTestCase(GTestCase* testCase);
- void removeTestCase(GTestCase* testCase);
+ void addTestCase(GTestSuite* testCase);
+ void removeTestCase(GTestSuite* testCase);
};
@@ -111,12 +111,12 @@
inline void GTestExecutable::setRunFlag(bool runOnSignal) {
this->runOnSignal = runOnSignal; }
-inline void GTestExecutable::addTestCase(GTestCase* testCase) {
+inline void GTestExecutable::addTestCase(GTestSuite* testCase) {
QObject::connect(testCase, SIGNAL(requestRun(QString, QString)),
this, SLOT(receiveRunRequest(QString, QString)));
}
-inline void GTestExecutable::removeTestCase(GTestCase* testCase) {
+inline void GTestExecutable::removeTestCase(GTestSuite* testCase) {
QObject::disconnect(testCase, SIGNAL(requestRun(QString, QString)),
this, SLOT(receiveRunRequest(QString, QString)));
}
=======================================
--- /trunk/include/GTestExecutableResults.h Mon Jul 26 15:58:53 2010
+++ /trunk/include/GTestExecutableResults.h Tue Jul 27 15:12:07 2010
@@ -59,5 +59,14 @@
totalTime = count;
}
+inline uint GTestExecutableResults::getTestRunCount() { return numTests; }
+
+inline uint GTestExecutableResults::getTestFailureCount() { return
numFailures; }
+
+inline uint GTestExecutableResults::getTestErrorCount() { return
numErrors; }
+
+inline uint GTestExecutableResults::getTestTotalTime() { return totalTime;
}
+
+inline QString GTestExecutableResults::getTestName() { return exeName; }
#endif /* GTESTEXECUTABLERESULTS_H_ */
=======================================
--- /trunk/src/GTestExecutable.cpp Mon Jul 26 15:58:53 2010
+++ /trunk/src/GTestExecutable.cpp Tue Jul 27 15:12:07 2010
@@ -168,7 +168,7 @@
}
void GTestExecutable::receiveRunRequest(QString caseName, QString
testName) {
- runList.append((GTestCase*)QObject::sender());
+ runList.append((GTestSuite*)QObject::sender());
testsToRun << caseName.append(".").append(testName);
}
=======================================
--- /trunk/src/GTestRunner.cpp Mon Jul 26 15:58:53 2010
+++ /trunk/src/GTestRunner.cpp Tue Jul 27 15:12:07 2010
@@ -212,7 +212,7 @@
QTreeWidgetItem* topLevelItem = 0;
QTreeWidgetItem* newItem = 0;
- GTestCase* fixture = 0;
+ GTestSuite* fixture = 0;
GTest* test = 0;
while(it != testList.end()) {
qDebug() << *it;
@@ -222,8 +222,8 @@
topLevelItem = new QTreeWidgetItem(testContainer,
QStringList()<<fixtureName);
topLevelItem->setFlags(Qt::ItemIsTristate | Qt::ItemIsSelectable |
Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
topLevelItem->setCheckState(0, Qt::Checked);
- fixture = new GTestCase(fixtureName);
- var.setValue<GTestCase*>(fixture);
+ fixture = new GTestSuite(fixtureName);
+ var.setValue<GTestSuite*>(fixture);
topLevelItem->setData(0,Qt::UserRole,var);
}
else {