ACF $AcfVersion:0$
CSerializationRegressionTestRunner.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QObject>
7#include <QtTest/QtTest>
8
9// ACF includes
11#include <iser/ISerializable.h>
14
23{
24 Q_OBJECT
25
26private slots:
27 void initTestCase();
28
29 // i2d library tests
30 void testVector2dSerialization();
31 void testPosition2dSerialization();
32 void testCircleSerialization();
33 void testRectangleSerialization();
34 void testLine2dSerialization();
35
36 // i3d library tests
37 void testVector3dSerialization();
38 void testBox3dSerialization();
39 void testSphereSerialization();
40 void testPlane3dSerialization();
41
42 // icmm library tests
43 void testVarColorSerialization();
44 void testSpectrumInfoSerialization();
45
46 // imath library tests
47 void testVarVectorSerialization();
48
49 // iprm library tests
50 void testIdParamSerialization();
51 void testNameParamSerialization();
52 void testTextParamSerialization();
53 void testEnableableParamSerialization();
54 void testSelectionParamSerialization();
55
56 // ifile library tests
57 void testFileNameParamSerialization();
58
59 // iimg library tests
60 void testScanlineMaskSerialization();
61
62 // Complex cross-library scenarios with dependency injection
63 void testComplexScenarioWithMultipleParams();
64 void testComplexScenarioWithGeometryAndColor();
65 void testComplexScenarioWithNestedSelections();
66
67 // Backward compatibility and versioning tests
68 void testBackwardCompatibilityVector2d();
69 void testBackwardCompatibilityCircle();
70 void testVersionManagement();
71
72 void cleanupTestCase();
73
74private:
82 template<typename T>
83 bool TestSerializationCycle(const T& original, T& restored);
84
92 template<typename T>
93 bool SaveReferenceData(const T& object, const QString& filename);
94
102 template<typename T>
103 bool LoadReferenceData(T& restored, const QString& filename);
104
108 QString GetReferenceDataPath() const;
109};
110
Cross-library component tests for regression of data model serialization.