pd_alg_nb_sub_a_test.hGo to the documentation of this file.00001 /** @file pd_alg_nb_sub_a_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_NB_SUB_A_TEST_H 00011 #define FAUDES_PD_ALG_NB_SUB_A_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 * Filter a nonterminal from a vector of terminals and nonterminals. 00021 */ 00022 void TestFilterMixedGrammarSymbols(); 00023 00024 /** 00025 * filter from an empty word 00026 */ 00027 void TestFilterNothing(); 00028 00029 /** 00030 * Find an eliminable symbol with Rnpp1 and an empty set of nonterminals 00031 */ 00032 void TestRnpp1FindSymbolsEmptySet(); 00033 00034 /** 00035 * Find an eliminable symbol with Rnpp1 and a nonempty set of nonterminals 00036 */ 00037 void TestRnpp1FindSymbolsNonemptySet(); 00038 00039 /** 00040 * Find all eliminable symbols with Rnppl and an empty set of nonterminals 00041 */ 00042 void TestRnpplFindSymbolsEmptySet(); 00043 00044 /** 00045 * Find all eliminable symbolswith Rnppl and a nonempty set of nonterminals 00046 */ 00047 void TestRnpplFindSymbolsNonemptySet(); 00048 00049 /** 00050 * Find all eliminable symbols with Rnppl and a set already containing all 00051 * eliminable symbols 00052 */ 00053 void TestRnpplFindSymbolsCompleteSet(); 00054 00055 /** 00056 * Remove all noneliminable nonterminals and all productions containing 00057 * noneliminable nonterminals 00058 */ 00059 void TestRnppGrammar1(); 00060 00061 /** 00062 * Remove all noneliminable nonterminals and all productions containing 00063 * noneliminable nonterminals 00064 */ 00065 void TestRnppGrammar2(); 00066 00067 /** 00068 * Try to remove all noneliminable nonterminals and all productions containing 00069 * noneliminable nonterminals from an empty grammar. 00070 */ 00071 void TestRnppEmptyGrammar(); 00072 00073 /** 00074 * Test if all terminals have been set correctly and match the generator's events. 00075 */ 00076 void TestSp2LrTerminals(); 00077 00078 /** 00079 * Test if all possible nonterminals were generated. 00080 */ 00081 void TestSp2LrNonterminals(); 00082 00083 /** 00084 * Test if all expected productions for read, pop and push transitions and for the final 00085 * states were generated. 00086 */ 00087 void TestSp2LrProductions(); 00088 00089 /** 00090 * Test if all expected productions for read, pop and push transitions and for the final 00091 * states were generated. 00092 */ 00093 void TestSp2Lr2Productions(); 00094 00095 /** 00096 * 00097 */ 00098 void TestRupProductions(); 00099 00100 /** 00101 * 00102 */ 00103 void TestRupNonterminals(); 00104 00105 /** 00106 * All Filter tests 00107 */ 00108 void TestFilter(); 00109 00110 /** 00111 * All Rnpp1 tests 00112 */ 00113 void TestRnpp1(); 00114 00115 /** 00116 * All Rnppl tests 00117 */ 00118 void TestRnppl(); 00119 00120 /** 00121 * All Rnpp tests 00122 */ 00123 void TestRnpp(); 00124 00125 /** 00126 * All Sp2Lr tests 00127 */ 00128 void TestSp2Lr(); 00129 00130 /** 00131 * All Sp2Lr tests 00132 */ 00133 void TestSp2Lr2(); 00134 00135 /** 00136 * All Rup tests 00137 */ 00138 void TestRup(); 00139 00140 } // namespace faudes 00141 00142 #endif libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen |