diff --git a/ChangeLog b/ChangeLog index 9fe812e9..c3701b82 100644 --- a/ChangeLog +++ b/ChangeLog @@ -17164,3 +17164,5 @@ 2018-07-18 Fred Gleason * Cleaned up SQL quieries in 'ripcd/' to ensure UTF-8 compatibility. +2018-07-18 Fred Gleason + * Removed 'sas_switch_torture' and 'sas_torture' from 'tests/'. diff --git a/tests/Makefile.am b/tests/Makefile.am index 2ef729af..0ecb907e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -37,8 +37,6 @@ noinst_PROGRAMS = audio_convert_test\ mcast_recv_test\ rdxml_parse_test\ reserve_carts_test\ - sas_switch_torture\ - sas_torture\ stringcode_test\ test_hash\ test_pam\ @@ -75,14 +73,6 @@ rdxml_parse_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ dist_reserve_carts_test_SOURCES = reserve_carts_test.cpp reserve_carts_test.h reserve_carts_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ -dist_sas_switch_torture_SOURCES = sas_switch_torture.cpp sas_switch_torture.h -nodist_sas_switch_torture_SOURCES = moc_sas_switch_torture.cpp -sas_switch_torture_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ - -dist_sas_torture_SOURCES = sas_torture.cpp sas_torture.h -nodist_sas_torture_SOURCES = moc_sas_torture.cpp -sas_torture_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ - dist_stringcode_test_SOURCES = stringcode_test.cpp stringcode_test.h stringcode_test_LDADD = @LIB_RDLIBS@ @LIBVORBIS@ diff --git a/tests/sas_switch_torture.cpp b/tests/sas_switch_torture.cpp deleted file mode 100644 index 30f95ce8..00000000 --- a/tests/sas_switch_torture.cpp +++ /dev/null @@ -1,188 +0,0 @@ -// sas_switch_torture.cpp -// -// A Qt-based application for playing Microsoft WAV files. -// -// (C) Copyright 2002-2005,2016 Fred Gleason -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2 as -// published by the Free Software Foundation. -// -// 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, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -MainWidget::MainWidget(QWidget *parent) - :QWidget(parent) -{ - unsigned schema=0; - - // - // Fix the Window Size - // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); - - // - // Generate Fonts - // - QFont font("Helvetica",12,QFont::Normal); - font.setPixelSize(12); - - // - // Open Database - // - rd_config=new RDConfig(RD_CONF_FILE); - rd_config->load(); - rd_config->setModuleName("sas_switch_torture"); - - QString err; - test_db=RDInitDb(&schema,&err); - if(!test_db) { - QMessageBox::warning(this,"Can't Connect", - err,0,1,1); - exit(0); - } - // - // Generate Button - // - QPushButton *button=new QPushButton(this,"generate_button"); - button->setGeometry(10,10,sizeHint().width()-20,50); - button->setText("Generate Test"); - button->setFont(font); - connect(button,SIGNAL(clicked()),this,SLOT(generateData())); - - // - // Remove Button - // - button=new QPushButton(this,"remove_button"); - button->setGeometry(10,70,sizeHint().width()-20,50); - button->setText("Remove Test"); - button->setFont(font); - connect(button,SIGNAL(clicked()),this,SLOT(removeData())); - - // - // Exit Button - // - button=new QPushButton(this,"cancel_button"); - button->setGeometry(10,130,sizeHint().width()-20,50); - button->setText("Exit"); - button->setFont(font); - connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); -} - - -QSize MainWidget::sizeHint() const -{ - return QSize(200,190); -} - - -QSizePolicy MainWidget::sizePolicy() const -{ - return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); -} - - -void MainWidget::generateData() -{ - QString sql; - RDSqlQuery *q; - QString rml; - QString desc; - - // - // Create Schedule - // - QTime time; - for(int i=0;i<86400000;i+=TIME_INTERVAL) { - for(int j=0;jquit(); -} - - -void MainWidget::closeEvent(QCloseEvent *e) -{ - cancelData(); -} - - -int main(int argc,char *argv[]) -{ - QApplication a(argc,argv); - - MainWidget *w=new MainWidget(); - a.setMainWidget(w); - w->setGeometry(QRect(QPoint(0,0),w->sizeHint())); - w->show(); - return a.exec(); -} - - diff --git a/tests/sas_switch_torture.h b/tests/sas_switch_torture.h deleted file mode 100644 index 77be5d64..00000000 --- a/tests/sas_switch_torture.h +++ /dev/null @@ -1,60 +0,0 @@ -// sas_switch_torture.h -// -// Generate Rivendell macro carts and scheduling for torture-testing -// an SAS router -// -// (C) Copyright 2002-2004,2016 Fred Gleason -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2 as -// published by the Free Software Foundation. -// -// 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, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// - -#ifndef SAS_SWITCH_TORTURE_H -#define SAS_SWITCH_TORTURE_H - -#include -#include - -#include - -#define SAS_INPUTS 32 -#define SAS_OUTPUTS 16 -#define SAS_STATION "hithlum" -#define SAS_MATRIX 1 -#define SAS_SLEEP 20 - -#define CART_START 10000 -#define TIME_INTERVAL 2000 - -class MainWidget : public QWidget -{ - Q_OBJECT - public: - MainWidget(QWidget *parent=0); - QSize sizeHint() const; - QSizePolicy sizePolicy() const; - - private slots: - void generateData(); - void removeData(); - void cancelData(); - void closeEvent(QCloseEvent *e); - - private: - QSqlDatabase *test_db; - QString test_filename; - RDConfig *rd_config; -}; - - -#endif // SAS_SWITCH_TORTURE_H diff --git a/tests/sas_torture.cpp b/tests/sas_torture.cpp deleted file mode 100644 index 68eb2966..00000000 --- a/tests/sas_torture.cpp +++ /dev/null @@ -1,200 +0,0 @@ -// sas_torture.cpp -// -// A Qt-based application for playing Microsoft WAV files. -// -// (C) Copyright 2002,2016 Fred Gleason -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2 as -// published by the Free Software Foundation. -// -// 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, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include - -MainWidget::MainWidget(QWidget *parent) - :QWidget(parent) -{ - unsigned schema=0; - - // - // Fix the Window Size - // - setMinimumWidth(sizeHint().width()); - setMaximumWidth(sizeHint().width()); - setMinimumHeight(sizeHint().height()); - setMaximumHeight(sizeHint().height()); - - // - // Generate Fonts - // - QFont font("Helvetica",12,QFont::Normal); - font.setPixelSize(12); - - // - // Open Database - // - rd_config=new RDConfig(RD_CONF_FILE); - rd_config->load(); - rd_config->setModuleName("sas_torture"); - - QString err; - test_db=RDInitDb(&schema,&err); - if(!test_db) { - QMessageBox::warning(this,"Can't Connect", - err,0,1,1); - exit(0); - } - // - // Generate Button - // - QPushButton *button=new QPushButton(this,"generate_button"); - button->setGeometry(10,10,sizeHint().width()-20,50); - button->setText("Generate Test"); - button->setFont(font); - connect(button,SIGNAL(clicked()),this,SLOT(generateData())); - - // - // Remove Button - // - button=new QPushButton(this,"remove_button"); - button->setGeometry(10,70,sizeHint().width()-20,50); - button->setText("Remove Test"); - button->setFont(font); - connect(button,SIGNAL(clicked()),this,SLOT(removeData())); - - // - // Exit Button - // - button=new QPushButton(this,"cancel_button"); - button->setGeometry(10,130,sizeHint().width()-20,50); - button->setText("Exit"); - button->setFont(font); - connect(button,SIGNAL(clicked()),this,SLOT(cancelData())); -} - - -QSize MainWidget::sizeHint() const -{ - return QSize(200,190); -} - - -QSizePolicy MainWidget::sizePolicy() const -{ - return QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed); -} - - -void MainWidget::generateData() -{ - QString sql; - RDSqlQuery *q; - QString rml; - QString desc; - - // - // Create Carts - // - for(int i=0;iquit(); -} - - -void MainWidget::closeEvent(QCloseEvent *e) -{ - cancelData(); -} - - -int main(int argc,char *argv[]) -{ - QApplication a(argc,argv); - - MainWidget *w=new MainWidget(); - a.setMainWidget(w); - w->setGeometry(QRect(QPoint(0,0),w->sizeHint())); - w->show(); - return a.exec(); -} - - diff --git a/tests/sas_torture.h b/tests/sas_torture.h deleted file mode 100644 index 8ba58b2a..00000000 --- a/tests/sas_torture.h +++ /dev/null @@ -1,61 +0,0 @@ -// sas_torture.h -// -// Generate Rivendell macro carts and scheduling for torture-testing -// an SAS router -// -// (C) Copyright 2002-2004,2016 Fred Gleason -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License version 2 as -// published by the Free Software Foundation. -// -// 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, write to the Free Software -// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -// - -#ifndef SAS_TORTURE_H -#define SAS_TORTURE_H - -#include -#include - -#include - -#define SAS_INPUTS 32 -#define SAS_OUTPUTS 16 -#define SAS_STATION "hithlum" -#define SAS_MATRIX 1 -#define SAS_SLEEP 20 - -#define CART_START 10000 -#define TIME_INTERVAL 20000 - -class MainWidget : public QWidget -{ - Q_OBJECT - public: - MainWidget(QWidget *parent=0); - QSize sizeHint() const; - QSizePolicy sizePolicy() const; - - private slots: - void generateData(); - void removeData(); - void cancelData(); - void closeEvent(QCloseEvent *e); - - private: - void LoadConfig(); - QSqlDatabase *test_db; - QString test_filename; - RDConfig *rd_config; -}; - - -#endif // SAS_TORTURE_H