6 #include "../../etvo/common/etvoException.h" 7 #include "../testException.h" 21 static bool TestAll(
const T & a,
const T& b,
const T& c,
const T& d)
33 std::cout <<
"Error in TestResiduation!" << std::endl;
34 std::cout <<
"Exception :" << e.Message() << std::endl;
39 std::cout <<
"Error in TestResiduation!" << std::endl;
40 std::cout <<
"Exception :" << e2.Message() << std::endl;
43 catch (
const std::exception & ex)
45 std::cout <<
"Error in TestResiduation!" << std::endl;
46 std::cout <<
"Exception :" << ex.what() << std::endl;
53 static void Test1(
const T & a,
const T& b,
const T & c)
56 T x = c.lfrac(tmpAplusB);
57 T y = (c.lfrac(a)).inf(c.lfrac(b));
61 std::cout <<
"Error in TestResiduation::Test1" << std::endl;
72 x = c.rfrac(tmpAplusB);
73 y = (c.rfrac(a)).inf(c.rfrac(b));
76 std::cout <<
"Error in TestResiduation::Test1" << std::endl;
83 throw testException(201,
"Test1b");
88 static void Test1b(
const T & a,
const T & b,
const T& c)
90 T tmpAinfB = a.inf(b);
91 T x = (tmpAinfB).lfrac(c);
92 T y = (a.lfrac(c)).inf(b.lfrac(c));
96 std::cout <<
"Error in TestResiduation::Test1b" << std::endl;
103 throw testException(205,
"Test1b_a");
107 x = (tmpAinfB).rfrac(c);
108 y = (a.rfrac(c)).inf(b.rfrac(c));
112 std::cout <<
"Error in TestResiduation::Test1b" << std::endl;
119 throw testException(205,
"Test1b_b");
124 static void Test2346(
const T & a,
const T& c,
const T & d)
131 y = (c.rfrac(d)).lfrac(a);
135 std::cout <<
"Error in TestResiduation::Test2346" << std::endl;
142 throw testException(202,
"Test2a");
151 std::cout <<
"Error in TestResiduation::Test2346" << std::endl;
158 throw testException(206,
"Test6a");
167 std::cout <<
"Error in TestResiduation::Test2346" << std::endl;
175 throw testException(206,
"Test6b");
182 y = a * (ac.lfrac(a));
186 std::cout <<
"Error in TestResiduation::Test2346" << std::endl;
191 throw testException(203,
"Test3a");
199 std::cout <<
"Error in TestResiduation::Test2346" << std::endl;
204 throw testException(203,
"Test3b");
208 y = (a * clfa).lfrac(a);
212 std::cout <<
"Error in TestResiduation::Test2346" << std::endl;
217 throw testException(204,
"Test4a");
221 y = (crfa*a).rfrac(a);
225 std::cout <<
"Error in TestResiduation::Test2346" << std::endl;
230 throw testException(204,
"Test4b");
Class to describe exceptions in etvo.
Definition: etvoException.h:25
Definition: testException.h:9
static bool TestAll(const T &a, const T &b, const T &c, const T &d)
a,b same Gain
Definition: TestResiduation.h:21
Definition: TestResiduation.h:17