From 73808809ef8a3e2448081b73a70d91cebecfffc6 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 23 Dec 2008 16:54:34 -0500 Subject: Adding Script tests and made the CMake file link only necessary things --- sigcore/test/TestScript.h | 51 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 sigcore/test/TestScript.h (limited to 'sigcore/test/TestScript.h') diff --git a/sigcore/test/TestScript.h b/sigcore/test/TestScript.h new file mode 100644 index 00000000..8768d593 --- /dev/null +++ b/sigcore/test/TestScript.h @@ -0,0 +1,51 @@ +/* + * Copyright 2008 Ben Boeckel + * + * 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 . + */ + +#ifndef TESTSCRIPT +#define TESTSCRIPT + +// Sigcore includes +#include "../Script.h" + +class TestScript : public QObject +{ + Q_OBJECT + Q_PROPERTY(QString value READ value WRITE setValue) + + public: + QString value() const; + void setValue(const QString& value); + public slots: + void slot1(); + void slot2(); + signals: + void signal1(); + void signal2(); + private: + bool m_foo; + bool m_bar; + QString m_value; + private slots: + void initTestCase(); + void setInterpreter(); + void setScript(); + void assignment(); + void equality(); + void running(); +}; + +#endif -- cgit