1 2 /********************************************************* 3 * Soothsayer, an extensible predictive text entry system 4 * ------------------------------------------------------ 5 * 6 * Copyright (C) 2008 Matteo Vescovi <matteo.vescovi@yahoo.co.uk> 7 8 This program is free software; you can redistribute it and/or modify 9 it under the terms of the GNU General Public License as published by 10 the Free Software Foundation; either version 2 of the License, or 11 (at your option) any later version. 12 13 This program is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 16 GNU General Public License for more details. 17 18 You should have received a copy of the GNU General Public License along 19 with this program; if not, write to the Free Software Foundation, Inc., 20 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 21 * 22 **********(*)*/ 23 24 #ifndef SOOTH_RECENCYPLUGINTEST 25 #define SOOTH_RECENCYPLUGINTEST 26 27 #include <cppunit/extensions/HelperMacros.h> 28 29 #include <plugins/recencyPlugin.h> 30 31 /** Test RecencyPlugin. 32 * 33 */ 34 class RecencyPluginTest : public CppUnit::TestFixture { 35 public: 36 void setUp(); 37 void tearDown(); 38 39 void testMaxPartialPredictionSize(); 40 void testCutoffThreshold(); 41 42 private: 43 Configuration* config; 44 ContextTracker* ct; 45 46 static const int SIZE; 47 static const char* LOGGER; 48 static const char* LAMBDA; 49 static const char* CUTOFF; 50 static const char* N_0; 51 52 CPPUNIT_TEST_SUITE( RecencyPluginTest ); 53 CPPUNIT_TEST( testMaxPartialPredictionSize ); 54 CPPUNIT_TEST( testCutoffThreshold ); 55 CPPUNIT_TEST_SUITE_END(); 56 }; 57 58 59 #endif // SOOTH_RECENCYPLUGINTEST 60