File indexing completed on 2024-12-22 04:10:25

0001 /*
0002  *  SPDX-FileCopyrightText: 2011 Dmitry Kazakov <dimula73@gmail.com>
0003  *
0004  *  SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #ifndef __KIS_STROKES_QUEUE_TEST_H
0008 #define __KIS_STROKES_QUEUE_TEST_H
0009 
0010 #include <simpletest.h>
0011 #include "kis_types.h"
0012 #include "kis_stroke_job_strategy.h"
0013 
0014 class KisStrokesQueueTest : public QObject
0015 {
0016     Q_OBJECT
0017 
0018 private Q_SLOTS:
0019     void testSequentialJobs();
0020     void testConcurrentSequentialBarrier();
0021     void testExclusiveStrokes();
0022     void testBarrierStrokeJobs();
0023     void testStrokesOverlapping();
0024     void testImmediateCancel();
0025     void testOpenedStrokeCounter();
0026     void testAsyncCancelWhileOpenedStroke();
0027     void testStrokesLevelOfDetail();
0028     void testStrokeWithMixedLodJobs();
0029     void testMultipleLevelOfDetailStrokes();
0030     void testMultipleLevelOfDetailAfterLegacy();
0031     void testMultipleLevelOfDetailMixedLegacy();
0032     void testCancelBetweenLodNStrokes();
0033     void testUFOVisitBetweenLodNStrokes();
0034     void testLodUndoBase();
0035     void testLodUndoBase2();
0036     void testMutatedJobs();
0037     void testUniquelyConcurrentJobs();
0038 
0039 private:
0040     struct LodStrokesQueueTester;
0041     static void checkJobsOverlapping(LodStrokesQueueTester &t, KisStrokeId id, KisStrokeJobData::Sequentiality first, KisStrokeJobData::Sequentiality second, bool allowed);
0042 };
0043 
0044 #endif /* __KIS_STROKES_QUEUE_TEST_H */