(Event+Time).Variant Operators
2.3
Operators for Timed Discrete Event Systems in Dioids
Test.h
1
#ifndef TEST_H
2
#define TEST_H
3
#include<exception>
4
#include<random>
5
6
#include "../etvo/common/global.h"
7
#include "macros.h"
8
9
#include "TestTemplate/TestResiduation.h"
10
#include "TestTemplate/TestResiduationIneq.h"
11
#include "TestTemplate/TestIS.h"
12
#include "TestTemplate/TestXIS.h"
13
#include "TestTemplate/TestKleene.h"
14
15
#include "../etvo/common/etvoException.h"
16
#include "factory/randGen.h"
17
18
#include "../etvo/wrapperMMGD/seriesWrapper.h"
19
#include "../etvo/Fper/Fminp.h"
20
#include "../etvo/Fper/Fmaxp.h"
21
#include "../etvo/seriesEd/seriesEd.h"
22
23
#include "../etvo/seriesTg/seriesTg.h"
24
25
26
#define TEST_FPER 1
27
#define TEST_POLY 2
28
#define TEST_SERIES 4
29
#define TEST_POLYED 8
30
#define TEST_POLYTG 16
31
#define TEST_SERIESED 32
32
#define TEST_SERIESTG 64
33
#define TEST_GNG_DDD 128
34
35
36
namespace
test
37
{
38
39
class
Test
40
{
41
public
:
42
static
bool
flag;
43
static
unsigned
percentEpsInFactory;
44
static
unsigned
percentPolyInFactory;
45
static
unsigned
nbTermsInFactory;
46
static
unsigned
gainInFactory;
47
48
static
void
setup(
unsigned
nIter,
unsigned
nLoops,
unsigned
nTerms,
unsigned
gain);
49
50
static
void
ScenarioAllUnit();
51
static
void
ScenarioAllSpecific(
unsigned
int
nbIter,
unsigned
int
nbLoops);
52
static
void
ScenarioAllRegular(
unsigned
int
nbIter,
unsigned
int
nbLoops,
bool
Fper=
false
);
53
54
static
void
TestAllUnit(
unsigned
int
TST);
55
static
void
TestAllRegular(
unsigned
int
TST);
56
static
void
TestAllSpecific(
unsigned
int
TST);
57
58
// TEST_FPER
59
static
bool
Regular_Fminp(
unsigned
nbIter);
60
static
bool
Regular_Fmaxp(
unsigned
nbIter);
61
static
bool
Unit_Fper();
62
static
bool
Unit_Fminp();
63
static
bool
Unit_Fmaxp();
64
65
// TEST_GNG_DDD
66
static
bool
Specific_gNg(
unsigned
nbIter);
67
static
bool
Specific_dDd(
unsigned
nbIter);
68
69
// TEST_POLY
70
static
unsigned
Unit_gdWrapper();
71
static
unsigned
Unit_polyWrapper();
72
static
bool
Regular_polyWrapper(
unsigned
nbIter,
unsigned
char
TST = global::TST_ALL);
73
74
// TEST_SERIES
75
static
unsigned
Unit_serieWrapper();
76
static
bool
Regular_serieWrapper(
unsigned
nbIter,
unsigned
char
TST = global::TST_ALL);
77
78
//TEST_POLYED
79
static
unsigned
Unit_Ed();
80
static
unsigned
Unit_polyEd();
81
static
bool
Specific_polyEd(
unsigned
nbIter);
82
static
bool
Regular_polyEd(
unsigned
,
unsigned
short
TST = 0x0F);
83
// extra tests called in Specific_polyEd
84
class
TestPolyEd
85
{
86
public
:
87
static
bool
TestOplus(
unsigned
nIter);
88
static
bool
TestOplusPP(
unsigned
nIter);
89
static
bool
TestOtimesPP(
unsigned
int
nIter);
90
static
bool
TestCompFrac(
unsigned
int
nIter);
91
static
bool
TestCompInfCD(
unsigned
int
nIter);
92
static
bool
TestCompOplusCD(
unsigned
int
nIter);
93
static
bool
TestCompOtimesCD(
unsigned
int
nIter);
94
95
};
96
97
static
unsigned
Unit_seriesEd();
98
static
bool
Regular_seriesEd(
unsigned
nbIter,
unsigned
short
TST= global::TST_ALL);
99
100
static
bool
Specific_seriesEd(
unsigned
nbIter);
101
static
bool
TestCanonSeriesEd(
unsigned
nIter);
// specific
102
static
bool
TestCoreSeriesEd(
unsigned
nIter);
// specific
103
class
TestSeriesEd
104
{
105
public
:
106
static
bool
TestLeftRight(
unsigned
nIter);
107
static
bool
TestOtimesSS(
unsigned
nIter);
108
static
bool
TestOtimesCD(
unsigned
nIter);
109
static
bool
TestOtimes(
unsigned
nIter);
110
static
bool
TestOplusSS(
unsigned
nIter);
111
static
bool
TestOplusCD(
unsigned
nIter);
112
static
bool
TestOplus(
unsigned
nIter);
113
static
bool
TestDistributivity(
unsigned
nIter,
unsigned
nTerms);
114
static
bool
TestStar(
unsigned
nIter,
unsigned
nTerms);
115
static
bool
TestCanon(
unsigned
nIter);
116
};
117
118
119
//TEST_POLYTG
120
static
unsigned
Unit_Tg();
121
static
unsigned
Unit_polyTg();
122
static
bool
Specific_polyTg(
unsigned
nbIter);
123
static
bool
Regular_polyTg(
unsigned
,
unsigned
short
TST = 0x0F);
124
125
class
TestPolyTg
126
{
127
public
:
128
static
bool
TestOplus(
unsigned
nIter);
129
static
bool
TestOplusPP(
unsigned
nIter);
130
static
bool
TestOtimesPP(
unsigned
int
nIter);
131
static
bool
TestCompFrac(
unsigned
int
nIter);
132
static
bool
TestCompInfCD(
unsigned
int
nIter);
133
static
bool
TestCompOplusCD(
unsigned
int
nIter);
134
static
bool
TestCompOtimesCD(
unsigned
int
nIter);
135
136
};
137
138
static
unsigned
Unit_seriesTg();
139
static
bool
Regular_seriesTg(
unsigned
nbIter,
unsigned
short
TST = global::TST_ALL);
140
static
bool
Specific_seriesTg(
unsigned
nbIter);
141
static
bool
TestCanonSeriesTg(
unsigned
nIter);
// specific
142
static
bool
TestCoreSeriesTg(
unsigned
nIter);
// specific
143
144
class
TestSeriesTg
145
{
146
public
:
147
static
bool
TestLeftRight(
unsigned
nIter);
148
static
bool
TestOtimesSS(
unsigned
nIter);
149
static
bool
TestOtimesCD(
unsigned
nIter);
150
static
bool
TestOtimes(
unsigned
nIter);
151
static
bool
TestOplusSS(
unsigned
nIter);
152
static
bool
TestOplusCD(
unsigned
nIter);
153
static
bool
TestOplus(
unsigned
nIter);
154
static
bool
TestDistributivity(
unsigned
nIter,
unsigned
nTerms);
155
static
bool
TestStar(
unsigned
nIter,
unsigned
nTerms);
156
static
bool
TestCanon(
unsigned
nIter);
157
};
158
159
static
void
TestPov();
160
static
void
TestBugs();
161
};
162
163
}
164
165
#endif // TEST_H
test
Definition:
Test.cpp:18
test::Test::TestSeriesEd
Definition:
Test.h:103
test::Test::TestSeriesTg
Definition:
Test.h:144
test::Test::TestPolyTg
Definition:
Test.h:125
test::Test::TestPolyEd
Definition:
Test.h:84
test::Test
Definition:
Test.h:39
test
Test.h
Generated by
1.8.14