summaryrefslogtreecommitdiffstats
path: root/sigcore
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-12-23 11:33:42 -0500
committerBen Boeckel <MathStuf@gmail.com>2008-12-23 11:33:42 -0500
commit4b5721f05ca039bc1656665811356edc3cf7839f (patch)
tree8838b964a2837034d8381020a96d5fecbc34638d /sigcore
parent47d5c9bee1fd35edb92e9d0dd2069b501480a8d3 (diff)
downloadsigen-4b5721f05ca039bc1656665811356edc3cf7839f.tar.gz
sigen-4b5721f05ca039bc1656665811356edc3cf7839f.tar.xz
sigen-4b5721f05ca039bc1656665811356edc3cf7839f.zip
Cleaned up test files to only be source files
Diffstat (limited to 'sigcore')
-rw-r--r--sigcore/test/CMakeLists.txt1
-rw-r--r--sigcore/test/TestFraction.cpp30
-rw-r--r--sigcore/test/TestFraction.h50
-rw-r--r--sigcore/test/TestHat.cpp18
-rw-r--r--sigcore/test/TestHat.h38
-rw-r--r--sigcore/test/TestMatrix.cpp29
-rw-r--r--sigcore/test/TestMatrix.h49
7 files changed, 71 insertions, 144 deletions
diff --git a/sigcore/test/CMakeLists.txt b/sigcore/test/CMakeLists.txt
index 5cbf093e..3fad7226 100644
--- a/sigcore/test/CMakeLists.txt
+++ b/sigcore/test/CMakeLists.txt
@@ -5,4 +5,3 @@ SET(libraries
MAKE_TEST(Fraction libraries)
MAKE_TEST(Hat libraries)
MAKE_TEST(Matrix libraries)
-# MAKE_TEST(Script libraries)
diff --git a/sigcore/test/TestFraction.cpp b/sigcore/test/TestFraction.cpp
index ec6fab37..dd8e8b81 100644
--- a/sigcore/test/TestFraction.cpp
+++ b/sigcore/test/TestFraction.cpp
@@ -15,12 +15,38 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-// Header include
-#include "TestFraction.h"
+// Sigcore includes
+#include "../Fraction.h"
// Qt includes
#include <QtTest/QTest>
+class TestFraction : public QObject
+{
+ Q_OBJECT
+
+ private slots:
+ void set();
+ void setNumerator();
+ void setDenominator();
+
+ void reduce();
+
+ void assignment();
+ void conversion();
+ void addition();
+ void subtraction();
+ void multiplication();
+ void division();
+ void modulo();
+
+ void equal();
+ void less();
+ void greater();
+
+ void normalize();
+};
+
void TestFraction::set()
{
Sigcore::Fraction frac(1, 1);
diff --git a/sigcore/test/TestFraction.h b/sigcore/test/TestFraction.h
deleted file mode 100644
index 2eb720a1..00000000
--- a/sigcore/test/TestFraction.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright 2008 Ben Boeckel <MathStuf@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef TESTFRACTION
-#define TESTFRACTION
-
-// Sigcore includes
-#include "../Fraction.h"
-
-class TestFraction : public QObject
-{
- Q_OBJECT
-
- private slots:
- void set();
- void setNumerator();
- void setDenominator();
-
- void reduce();
-
- void assignment();
- void conversion();
- void addition();
- void subtraction();
- void multiplication();
- void division();
- void modulo();
-
- void equal();
- void less();
- void greater();
-
- void normalize();
-};
-
-#endif
diff --git a/sigcore/test/TestHat.cpp b/sigcore/test/TestHat.cpp
index 215744a7..78d39f25 100644
--- a/sigcore/test/TestHat.cpp
+++ b/sigcore/test/TestHat.cpp
@@ -15,12 +15,26 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-// Header include
-#include "TestHat.h"
+// Sigcore includes
+#include "../Hat.h"
// Qt includes
#include <QtTest/QTest>
+class TestHat : public QObject
+{
+ Q_OBJECT
+
+ private slots:
+ void initTestCase();
+ void pick();
+ void take();
+ void takeAndClear();
+ void setCount();
+ void add();
+ void chance();
+};
+
void TestHat::initTestCase()
{
qsrand(QDateTime::currentDateTime().toTime_t());
diff --git a/sigcore/test/TestHat.h b/sigcore/test/TestHat.h
deleted file mode 100644
index b54dc759..00000000
--- a/sigcore/test/TestHat.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright 2008 Ben Boeckel <MathStuf@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef TESTHAT
-#define TESTHAT
-
-// Sigcore includes
-#include "../Hat.h"
-
-class TestHat : public QObject
-{
- Q_OBJECT
-
- private slots:
- void initTestCase();
- void pick();
- void take();
- void takeAndClear();
- void setCount();
- void add();
- void chance();
-};
-
-#endif
diff --git a/sigcore/test/TestMatrix.cpp b/sigcore/test/TestMatrix.cpp
index 53cf57ea..908ae80b 100644
--- a/sigcore/test/TestMatrix.cpp
+++ b/sigcore/test/TestMatrix.cpp
@@ -15,12 +15,37 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-// Header include
-#include "TestMatrix.h"
+// Sigcore includes
+#include "../Matrix.h"
// Qt includes
#include <QtTest/QTest>
+class TestMatrix : public QObject
+{
+ Q_OBJECT
+
+ private slots:
+ void addRow();
+ void addColumn();
+ void insertRow();
+ void insertColumn();
+ void deleteRow();
+ void deleteColumn();
+
+ void clear();
+
+ void resize();
+
+ void row();
+ void column();
+
+ void access();
+
+ void assignment();
+ void equal();
+};
+
void TestMatrix::addRow()
{
Sigcore::Matrix<int> mat;
diff --git a/sigcore/test/TestMatrix.h b/sigcore/test/TestMatrix.h
deleted file mode 100644
index 7d30d030..00000000
--- a/sigcore/test/TestMatrix.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright 2008 Ben Boeckel <MathStuf@gmail.com>
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program 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 General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef TESTMATRIX
-#define TESTMATRIX
-
-// Sigcore includes
-#include "../Matrix.h"
-
-class TestMatrix : public QObject
-{
- Q_OBJECT
-
- private slots:
- void addRow();
- void addColumn();
- void insertRow();
- void insertColumn();
- void deleteRow();
- void deleteColumn();
-
- void clear();
-
- void resize();
-
- void row();
- void column();
-
- void access();
-
- void assignment();
- void equal();
-};
-
-#endif