4#include "utils/testing/SETestManager.h"
20 #if defined (__clang__)
22 #elif defined(__gnu_linux__)
23 #define CDM_TEST_DECL __attribute__ ((visibility ("default")))
25 #ifdef SHARED_CDM_TEST
26 #define CDM_TEST_DECL __declspec(dllexport)
28 #define CDM_TEST_DECL __declspec(dllimport)
33enum enumCDMTestSourceType
47 virtual bool RunTest(
const std::string& testName,
const std::string& sOutputDirectory)
override;
55 typedef std::map<std::string, testFunction>
testMap;
64 void BasicCircuitTest(
const std::string& sOutputDirectory);
65 void MultiphysicsElectricalCircuitTest(
const std::string& sOutputDirectory);
66 void MultiphysicsFluidCircuitTest(
const std::string& sOutputDirectory);
67 void MultiphysicsThermalCircuitTest(
const std::string& sOutputDirectory);
69 void SeriesRCDCTest(
const std::string& sOutputDirectory);
70 void SeriesRCSINTest(
const std::string& sOutputDirectory);
71 void SeriesRCPULSETest(
const std::string& sOutputDirectory);
73 void SeriesRDCTest(
const std::string& sOutputDirectory);
74 void SeriesRSINTest(
const std::string& sOutputDirectory);
75 void SeriesRPULSETest(
const std::string& sOutputDirectory);
77 void SeriesRLDCTest(
const std::string& sOutputDirectory);
78 void SeriesRLSINTest(
const std::string& sOutputDirectory);
79 void SeriesRLPULSETest(
const std::string& sOutputDirectory);
81 void ParallelRDCTest(
const std::string& sOutputDirectory);
82 void ParallelRSINTest(
const std::string& sOutputDirectory);
83 void ParallelRPULSETest(
const std::string& sOutputDirectory);
85 void ParallelRCDCTest(
const std::string& sOutputDirectory);
86 void ParallelRCSINTest(
const std::string& sOutputDirectory);
87 void ParallelRCPULSETest(
const std::string& sOutputDirectory);
89 void ParallelRLDCTest(
const std::string& sOutputDirectory);
90 void ParallelRLSINTest(
const std::string& sOutputDirectory);
91 void ParallelRLPULSETest(
const std::string& sOutputDirectory);
92 void ParallelRLSINCenteredTest(
const std::string& sOutputDirectory);
94 void SeriesRLCDCTest(
const std::string& sOutputDirectory);
95 void SeriesRLCSINTest(
const std::string& sOutputDirectory);
96 void SeriesRLCPULSETest(
const std::string& sOutputDirectory);
98 void ParallelRLCDCTest(
const std::string& sOutputDirectory);
99 void ParallelRLCSINTest(
const std::string& sOutputDirectory);
100 void ParallelRLCPULSETest(
const std::string& sOutputDirectory);
102 void SwitchRCDCTest(
const std::string& sOutputDirectory);
103 void SwitchRCSINTest(
const std::string& sOutputDirectory);
104 void SwitchRCPULSETest(
const std::string& sOutputDirectory);
106 void Comprehensive1DCTest(
const std::string& sOutputDirectory);
107 void Comprehensive1SINTest(
const std::string& sOutputDirectory);
108 void Comprehensive1PULSETest(
const std::string& sOutputDirectory);
110 void SimpleDiodeDCTest(
const std::string& sOutputDirectory);
111 void SimpleDiodeSINTest(
const std::string& sOutputDirectory);
112 void SimpleDiodePULSETest(
const std::string& sOutputDirectory);
114 void SeriesRCDCCurrentTest(
const std::string& sOutputDirectory);
115 void SeriesRCSINCurrentTest(
const std::string& sOutputDirectory);
116 void SeriesRCPULSECurrentTest(
const std::string& sOutputDirectory);
118 void ParallelRCDCCurrentTest(
const std::string& sOutputDirectory);
119 void ParallelRCSINCurrentTest(
const std::string& sOutputDirectory);
120 void ParallelRCPULSECurrentTest(
const std::string& sOutputDirectory);
122 void SeriesCapDCTest(
const std::string& sOutputDirectory);
123 void SeriesCapSINTest(
const std::string& sOutputDirectory);
124 void SeriesCapPULSETest(
const std::string& sOutputDirectory);
126 void ParallelRDCCurrentTest(
const std::string& sOutputDirectory);
127 void ParallelRSINCurrentTest(
const std::string& sOutputDirectory);
128 void ParallelRPULSECurrentTest(
const std::string& sOutputDirectory);
130 void CurrentCompDCTest(
const std::string& sOutputDirectory);
131 void CurrentCompSINTest(
const std::string& sOutputDirectory);
132 void CurrentCompPULSETest(
const std::string& sOutputDirectory);
134 void SeriesRLDCCurrentTest(
const std::string& sOutputDirectory);
135 void SeriesRLSINCurrentTest(
const std::string& sOutputDirectory);
136 void SeriesRLPULSECurrentTest(
const std::string& sOutputDirectory);
138 void ParallelRLDCCurrentTest(
const std::string& sOutputDirectory);
139 void ParallelRLSINCurrentTest(
const std::string& sOutputDirectory);
140 void ParallelRLPULSECurrentTest(
const std::string& sOutputDirectory);
142 void BasicDiodeDCCurrentTest(
const std::string& sOutputDirectory);
143 void BasicDiodeSINCurrentTest(
const std::string& sOutputDirectory);
144 void BasicDiodePULSECurrentTest(
const std::string& sOutputDirectory);
147 void SwitchRCDCCurrentTest(
const std::string& sOutputDirectory);
148 void SwitchRCSINCurrentTest(
const std::string& sOutputDirectory);
149 void SwitchRCPULSECurrentTest(
const std::string& sOutputDirectory);
151 void SeriesRLCDCCurrentTest(
const std::string& sOutputDirectory);
152 void SeriesRLCSINCurrentTest(
const std::string& sOutputDirectory);
153 void SeriesRLCPULSECurrentTest(
const std::string& sOutputDirectory);
155 void ParallelRLCDCCurrentTest(
const std::string& sOutputDirectory);
156 void ParallelRLCSINCurrentTest(
const std::string& sOutputDirectory);
157 void ParallelRLCPULSECurrentTest(
const std::string& sOutputDirectory);
159 void SeriesPressureSourceAdditionDCTest(
const std::string& sOutputDirectory);
160 void SeriesPressureSourceAdditionSINTest(
const std::string& sOutputDirectory);
161 void SeriesPressureSourceAdditionPULSETest(
const std::string& sOutputDirectory);
164 void SeriesCurrentSourceAdditionDCTest(
const std::string& sOutputDirectory);
165 void SeriesCurrentSourceAdditionSINTest(
const std::string& sOutputDirectory);
166 void SeriesCurrentSourceAdditionPULSETest(
const std::string& sOutputDirectory);
168 void ParallelPressureSourceAdditionDCTest(
const std::string& sOutputDirectory);
169 void ParallelPressureSourceAdditionSINTest(
const std::string& sOutputDirectory);
170 void ParallelPressureSourceAdditionPULSETest(
const std::string& sOutputDirectory);
172 void ParallelCurrentSourceAdditionDCTest(
const std::string& sOutputDirectory);
173 void ParallelCurrentSourceAdditionSINTest(
const std::string& sOutputDirectory);
174 void ParallelCurrentSourceAdditionPULSETest(
const std::string& sOutputDirectory);
176 void SeriesCapDCCurrentTest(
const std::string& sOutputDirectory);
177 void SeriesCapSINCurrentTest(
const std::string& sOutputDirectory);
178 void SeriesCapPULSECurrentTest(
const std::string& sOutputDirectory);
180 void ParallelCapDCTest(
const std::string& sOutputDirectory);
181 void ParallelCapSINTest(
const std::string& sOutputDirectory);
182 void ParallelCapPULSETest(
const std::string& sOutputDirectory);
184 void ParallelCapDCCurrentTest(
const std::string& sOutputDirectory);
185 void ParallelCapSINCurrentTest(
const std::string& sOutputDirectory);
186 void ParallelCapPULSECurrentTest(
const std::string& sOutputDirectory);
188 void SeriesIndDCTest(
const std::string& sOutputDirectory);
189 void SeriesIndSINTest(
const std::string& sOutputDirectory);
190 void SeriesIndPULSETest(
const std::string& sOutputDirectory);
192 void SeriesIndDCCurrentTest(
const std::string& sOutputDirectory);
193 void SeriesIndSINCurrentTest(
const std::string& sOutputDirectory);
194 void SeriesIndPULSECurrentTest(
const std::string& sOutputDirectory);
196 void ParallelIndDCTest(
const std::string& sOutputDirectory);
197 void ParallelIndSINTest(
const std::string& sOutputDirectory);
198 void ParallelIndPULSETest(
const std::string& sOutputDirectory);
200 void ParallelIndDCCurrentTest(
const std::string& sOutputDirectory);
201 void ParallelIndSINCurrentTest(
const std::string& sOutputDirectory);
202 void ParallelIndPULSECurrentTest(
const std::string& sOutputDirectory);
205 void BadDiodeDCTest(
const std::string& sOutputDirectory);
206 void BadDiodeSINTest(
const std::string& sOutputDirectory);
207 void BadDiodePULSETest(
const std::string& sOutputDirectory);
209 void ValidationComprehensive1DCTest(
const std::string& sOutputDirectory);
210 void ValidationComprehensive1SINTest(
const std::string& sOutputDirectory);
211 void ValidationComprehensive1PULSETest(
const std::string& sOutputDirectory);
212 void ValidationComprehensive1SINCenteredTest(
const std::string& sOutputDirectory);
214 void ValidationComprehensive2DCTest(
const std::string& sOutputDirectory);
215 void ValidationComprehensive2SINTest(
const std::string& sOutputDirectory);
216 void ValidationComprehensive2PULSETest(
const std::string& sOutputDirectory);
217 void ValidationComprehensive2SINCenteredTest(
const std::string& sOutputDirectory);
220 void ElectricalCircuitTest(
const std::string& sOutputDirectory);
221 void FluidCircuitTest(
const std::string& sOutputDirectory);
222 void ThermalCircuitTest(
const std::string& sOutputDirectory);
223 void CombinedCircuitTest(
const std::string& sOutputDirectory);
224 void CircuitErrorTest(
const std::string& sOutputDirectory);
225 void DynamicallyChangingCircuitTest(
const std::string& sOutputDirectory);
226 void NonZeroReferencePositive(
const std::string& sOutputDirectory);
227 void NonZeroReferenceNegative(
const std::string& sOutputDirectory);
228 void PolarizedCapacitorTest(
const std::string& sOutputDirectory);
229 void PreChargeComplianceZeroVolume(
const std::string& sOutputDirectory);
230 void PreChargeComplianceNonZeroVolume(
const std::string& sOutputDirectory);
231 void ComplianceVolumeChange(
const std::string& sOutputDirectory);
232 void CircuitLockingTest(
const std::string& sOutputDirectory);
236 void RunTest(
const std::string& sOutputDirectory,
const std::string& testName, enumCDMTestSourceType sourceType,
int testIndex);
239 void TestSetup7SeriesRCDC();
240 void TestSetup7SeriesRCSIN();
241 void TestSetup7SeriesRCPULSE();
242 void TestSetup8SeriesRDC();
243 void TestSetup8SeriesRSIN();
244 void TestSetup8SeriesRPULSE();
245 void TestSetup9SeriesRLDC();
246 void TestSetup9SeriesRLSIN();
247 void TestSetup9SeriesRLPULSE();
248 void TestSetup10ParallelRDC();
249 void TestSetup10ParallelRSIN();
250 void TestSetup10ParallelRPULSE();
251 void TestSetup11ParallelRCDC();
252 void TestSetup11ParallelRCSIN();
253 void TestSetup11ParallelRCPULSE();
254 void TestSetup12ParallelRLDC();
255 void TestSetup12ParallelRLSIN();
256 void TestSetup12ParallelRLPULSE();
257 void TestSetup12ParallelRLSINCentered();
258 void TestSetup13SeriesRLCDC();
259 void TestSetup13SeriesRLCSIN();
260 void TestSetup13SeriesRLCPULSE();
261 void TestSetup14ParallelRLCDC();
262 void TestSetup14ParallelRLCSIN();
263 void TestSetup14ParallelRLCPULSE();
264 void TestSetup15SwitchRCDC();
265 void TestSetup15SwitchRCSIN();
266 void TestSetup15SwitchRCPULSE();
267 void TestSetup16Comprehensive1DC();
268 void TestSetup16Comprehensive1SIN();
269 void TestSetup16Comprehensive1PULSE();
270 void TestSetup17BasicDiodeDC();
271 void TestSetup17BasicDiodeSIN();
272 void TestSetup17BasicDiodePULSE();
273 void TestSetup18RCSeriesDCCurrent();
274 void TestSetup18RCSeriesSINCurrent();
275 void TestSetup18RCSeriesPulseCurrent();
276 void TestSetup19RCParallelDCCurrent();
277 void TestSetup19RCParallelSINCurrent();
278 void TestSetup19RCParallelPulseCurrent();
279 void TestSetup20SeriesCapDC();
280 void TestSetup20SeriesCapSIN();
281 void TestSetup20SeriesCapPulse();
282 void TestSetup21ParallelRDCCurrent();
283 void TestSetup21ParallelRSINCurrent();
284 void TestSetup21ParallelRPulseCurrent();
285 void TestSetup22CurrentCompDC();
286 void TestSetup22CurrentCompSIN();
287 void TestSetup22CurrentCompPulse();
288 void TestSetup23SeriesRLDCCurrent();
289 void TestSetup23SeriesRLSINCurrent();
290 void TestSetup23SeriesRLPULSECurrent();
291 void TestSetup24ParallelRLDCCurrent();
292 void TestSetup24ParallelRLSINCurrent();
293 void TestSetup24ParallelRLPULSECurrent();
294 void TestSetup25BasicDiodeDCCurrent();
295 void TestSetup25BasicDiodeSINCurrent();
296 void TestSetup25BasicDiodePULSECurrent();
297 void TestSetup26SwitchRCDCCurrent();
298 void TestSetup26SwitchRCSINCurrent();
299 void TestSetup26SwitchRCPULSECurrent();
300 void TestSetup27SeriesRLCDCCurrent();
301 void TestSetup27SeriesRLCSINCurrent();
302 void TestSetup27SeriesRLCPULSECurrent();
303 void TestSetup28ParallelRLCDCCurrent();
304 void TestSetup28ParallelRLCSINCurrent();
305 void TestSetup28ParallelRLCPULSECurrent();
306 void TestSetup29SeriesPressureSourceAdditionDC();
307 void TestSetup29SeriesPressureSourceAdditionSIN();
308 void TestSetup29SeriesPressureSourceAdditionPULSE();
309 void TestSetup30SeriesCurrentSourceAdditionDC();
310 void TestSetup30SeriesCurrentSourceAdditionSIN();
311 void TestSetup30SeriesCurrentSourceAdditionPULSE();
312 void TestSetup31ParallelPressureSourceAdditionDC();
313 void TestSetup31ParallelPressureSourceAdditionSIN();
314 void TestSetup31ParallelPressureSourceAdditionPULSE();
315 void TestSetup32ParallelCurrentSourceAdditionDC();
316 void TestSetup32ParallelCurrentSourceAdditionSIN();
317 void TestSetup32ParallelCurrrentSourceAdditionPULSE();
318 void TestSetup33SeriesCapDCCurrent();
319 void TestSetup33SeriesCapSINCurrent();
320 void TestSetup33SeriesCapPulseCurrent();
321 void TestSetup34ParallelCapDC();
322 void TestSetup34ParallelCapSIN();
323 void TestSetup34ParallelCapPulse();
324 void TestSetup35ParallelCapDCCurrent();
325 void TestSetup35ParallelCapSINCurrent();
326 void TestSetup35ParallelCapPulseCurrent();
327 void TestSetup36SeriesIndDC();
328 void TestSetup36SeriesIndSIN();
329 void TestSetup36SeriesIndPulse();
330 void TestSetup37SeriesIndDCCurrent();
331 void TestSetup37SeriesIndSINCurrent();
332 void TestSetup37SeriesIndPulseCurrent();
333 void TestSetup38ParallelIndDC();
334 void TestSetup38ParallelIndSIN();
335 void TestSetup38ParallelIndPulse();
336 void TestSetup39ParallelIndDCCurrent();
337 void TestSetup39ParallelIndSINCurrent();
338 void TestSetup39ParallelIndPulseCurrent();
339 void TestSetup40BadDiodeDC();
340 void TestSetup40BadDiodeSIN();
341 void TestSetup40BadDiodePulse();
342 void TestSetup41ValidationComprehensive1DC();
343 void TestSetup41ValidationComprehensive1SIN();
344 void TestSetup41ValidationComprehensive1Pulse();
345 void TestSetup41ValidationComprehensive1SINCentered();
346 void TestSetup42ValidationComprehensive2DC();
347 void TestSetup42ValidationComprehensive2SIN();
348 void TestSetup42ValidationComprehensive2Pulse();
349 void TestSetup42ValidationComprehensive2SINCentered();
351 void TestPreProcess1(
double dT,
int i);
352 void TestPreProcess2(
double dT,
int i);
353 void TestPreProcess3(
double dT,
int i);
354 void TestPreProcess4(
double dT,
int i);
355 void BasicCircuitPreProcess(
double dT);
358 void TestCircuitSerialization(
const std::string& fileName);
367 void GasCompartmentTest(
const std::string& sOutputDirectory);
368 void LiquidCompartmentTest(
const std::string& sOutputDirectory);
369 void ThermalCompartmentTest(
const std::string& sOutputDirectory);
370 void TissueCompartmentTest(
const std::string& sOutputDirectory);
405 void LargeFlowTransportTest(
const std::string& sOutputDirectory);
406 void LiquidTransportTest(
const std::string& sOutputDirectory);
407 void GasTransportTest(
const std::string& sOutputDirectory);
414 void BasicBlackBoxComparisonTest(
const std::string& sOutputDirectory);
415 void BasicBlackBoxTest(
const std::string& sOutputDirectory);
416 void WindkesselBlackBoxTest(
const std::string& sOutputDirectory);
417 void BlackBoxComplianceTest(
const std::string& sOutputDirectory);
418 void BlackBoxSourcesTest(
const std::string& sOutputDirectory);
424 void ActionTest(
const std::string& sOutputDirectory);
425 void ReadPatientDirectory(
const std::string& sOutputDirectory);
426 void ReadSubstanceDirectory(
const std::string& sOutputDirectory);
427 void ConvertScenarioLogs(
const std::string& sOutputDirectory);
433 void ScalarTest(
const std::string& sOutputDirectory);
434 void UnitsTest(
const std::string& sOutputDirectory);
435 void WaveformInterpolatorTest(
const std::string& sOutputDirectory);
437 void ConvertList(std::vector<std::string> stringList);
Definition: CommonDataModelTest.h:42
SECircuitManager * m_Circuits
Definition: CommonDataModelTest.h:360
std::map< std::string, testFunction > testMap
Definition: CommonDataModelTest.h:55
std::string m_OutDirectory
Definition: CommonDataModelTest.h:52
testMap cdmMap
Definition: CommonDataModelTest.h:56
double m_PercentTolerance
Definition: CommonDataModelTest.h:51
Definition: SECircuitManager.h:38
Definition: SECompartmentManager.h:25
Definition: SEFluidCircuit.h:12
Definition: SEGasCompartment.h:14
Definition: SEGasSubstanceQuantity.h:10
Definition: SELiquidCompartment.h:12
Definition: SELiquidSubstanceQuantity.h:12
Definition: SESubstanceManager.h:9
Definition: SETestCase.h:9
Definition: SETestManager.h:23
virtual bool RunTest(const std::string &testName, const std::string &sOutputDirectory)=0
virtual void FillFunctionMap()=0
Definition: SETestSuite.h:10
Definition: SEThermalCompartment.h:12