Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

Tester.cpp

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   SpikeStream Application                                               *
00003  *   Copyright (C) 2007 by David Gamez                                     *
00004  *   david@davidgamez.eu                                                   *
00005  *   Version 0.1                                                           *
00006  *                                                                         *
00007  *   This program is free software; you can redistribute it and/or modify  *
00008  *   it under the terms of the GNU General Public License as published by  *
00009  *   the Free Software Foundation; either version 2 of the License, or     *
00010  *   (at your option) any later version.                                   *
00011  *                                                                         *
00012  *   This program is distributed in the hope that it will be useful,       *
00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00015  *   GNU General Public License for more details.                          *
00016  *                                                                         *
00017  *   You should have received a copy of the GNU General Public License     *
00018  *   along with this program; if not, write to the                         *
00019  *   Free Software Foundation, Inc.,                                       *
00020  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00021  ***************************************************************************/
00022 
00023 //SpikeStream includes
00024 #include "Tester.h"
00025 #include "Debug.h"
00026 #include "Utilities.h"
00027 
00028 //Other includes
00029 #include <iostream>
00030 using namespace std;
00031 
00032 
00033 /*! Constructor that calls the test code method. */
00034 Tester::Tester(){
00035         testCode();
00036 }
00037 
00038 
00039 /*! Destructor. */
00040 Tester::~Tester(){
00041         #ifdef MEMORY_DEBUG
00042                 cout<<"DELETING TESTER"<<endl;
00043         #endif//MEMORY_DEBUG
00044 }
00045 
00046 
00047 //------------------------------------------------------------------------
00048 //------------------------- PUBLIC METHODS -------------------------------
00049 //------------------------------------------------------------------------
00050 
00051 /*! Method containing code to be tested.
00052         Add any code you want to test here and enable the Tester constructor
00053         in SpikeStreamMainWindow constructor. */
00054 void Tester::testCode(){
00055 /*      string testStr="1e-06";
00056         double testDoub = Utilities::getDouble(testStr);
00057         cout<<"TEST DOUBLE RESULT1 = "<<testDoub<<endl;
00058 
00059         testStr="999e-06";
00060         testDoub = Utilities::getDouble(testStr);
00061         cout<<"TEST DOUBLE RESULT2 = "<<testDoub<<endl;
00062 
00063         testStr="-5.565E-06";
00064         testDoub = Utilities::getDouble(testStr);
00065         cout<<"TEST DOUBLE RESULT3 = "<<testDoub<<endl;
00066 
00067         testStr="1e06";
00068         testDoub = Utilities::getDouble(testStr);
00069         cout<<"TEST DOUBLE RESULT4 = "<<testDoub<<endl;
00070 
00071         testStr="999E06";
00072         testDoub = Utilities::getDouble(testStr);
00073         cout<<"TEST DOUBLE RESULT5 = "<<testDoub<<endl;
00074 
00075         testStr="-5.565e+06";
00076         testDoub = Utilities::getDouble(testStr);
00077         cout<<"TEST DOUBLE RESULT6 = "<<testDoub<<endl;*/
00078 }
00079 
00080 

Generated on Mon Sep 3 22:29:04 2007 for SpikeStream Application by  doxygen 1.4.4