pd_alg_first_test.h

Go to the documentation of this file.
00001 /** @file pd_alg_first_test.h  Unit Tests */
00002 
00003 
00004 /* Pushdown plugin for FAU Discrete Event Systems Library (libfaudes)
00005 
00006    Copyright (C) 2013  Stefan Jacobi, Sven Schneider, Anne-Kathrin Hess
00007 
00008 */
00009 
00010 #ifndef FAUDES_PD_ALG_FIRST_TEST_H
00011 #define FAUDES_PD_ALG_FIRST_TEST_H
00012 
00013 #include "corefaudes.h"
00014 #include "pd_include.h"
00015 #include "pd_test_util.h"
00016 
00017 namespace faudes {
00018 
00019   
00020 /**
00021  * Test all postfixes of a given word.
00022  */
00023 void TestPostClPostfixes();
00024 
00025 /**
00026  * Test if Fds returns all expected words.
00027  */
00028 void TestFdsWords();
00029 
00030 /**
00031  * Test if the mapping function produced by FirstL is correct.
00032  */
00033 void TestFirstLMap();
00034 
00035 /**
00036  * Test for some selected word if the correct set of terminals is returned.
00037  */
00038 void TestFirstASelectedWords();
00039 
00040 /**
00041  * Test for some selected word if the correct set of terminals is returned.
00042  */
00043 void TestFirstSelectedWords();
00044 
00045 /**
00046  * Test FirstRed with a consistent word as input
00047  */
00048 void TestFirstRedConsistentWord();
00049 
00050 /**
00051  * Test FirstRed with an inconsistent word as input
00052  */
00053 void TestFirstRedInconsistentWord();
00054 
00055 /**
00056  * Filter a nonterminal from a vector of terminals and nonterminals.
00057  */
00058 void TestFilter1MixedGrammarSymbols();
00059 
00060 /**
00061  * filter from an empty word
00062  */
00063 void TestFilter1Nothing();
00064 
00065 /**
00066  * Test with only Terminals as input
00067  */
00068 void TestFirstAllTerminalsOnly();
00069 
00070 /**
00071  * Test with Nonterminals and a reducible word as input
00072  */
00073 void TestFirstAllNonterminalsReducible();
00074 
00075 /**
00076  * Test with Nonterminals and an irreducible word as input
00077  */
00078 void TestFirstAllNonterminalsIrreducible();
00079 
00080 /**
00081  * Test with k = 0 and a word that results in an empty first set
00082  */
00083 void TestFirstLeq1ZeroEmpty();
00084 
00085 /**
00086  * Test with k = 0 and a word that results in a nonempty first set
00087  */
00088 void TestFirstLeq1ZeroNonempty();
00089 
00090 /**
00091  * Test with k = 1 and a word that results in a nonempty first set
00092  */
00093 void TestFirstLeq1OneNonempty();
00094 
00095 /**
00096  * Test with k = 2 and a word that results in a nonempty first set
00097  */
00098 void TestFirstLeq1TwoNonempty();
00099 
00100 /**
00101  * All PostCl tests
00102  */
00103 void TestPostCl();
00104 
00105 /**
00106  * All Fds tests
00107  */
00108 void TestFds();
00109 
00110 /**
00111  * All FirstL tests. Includes testing of First1, because First1 needs to be called
00112  * recursively in order to be tested correctly. FirstL does nothing else than calling
00113  * First1 recursively.
00114  */
00115 void TestFirstL();
00116 
00117 /**
00118  * All FirstA tests
00119  */
00120 void TestFirstA();
00121 
00122 /**
00123  * All First tests
00124  */
00125 void TestFirst();
00126 
00127 /**
00128  * All FirstRed tests
00129  */
00130 void TestFirstRed();
00131 
00132 /**
00133  * All Filter1 tests
00134  */
00135 void TestFilter1();
00136 
00137 /**
00138  * All FirstAll tests
00139  */
00140 void TestFirstAll();
00141 
00142 /**
00143  * All FirstLeq1 tests
00144  */
00145 void TestFirstLeq1();
00146 
00147 } // namespace faudes
00148 
00149 #endif

libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen