Commit 00e39765 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix an assert in KisCloneLayerTest

parent dac4dc72
......@@ -347,7 +347,7 @@ struct CyclingTester {
KisLayerSP cloneOfGroup2;
};
inline void addIfNotPresent(KisNodeSP node, CyclingTester &t, KisNodeSP group1Child, KisNodeSP group2Child)
inline void addIfNotAnyOf(KisNodeSP node, CyclingTester &t, KisNodeSP group1Child, KisNodeSP group2Child)
{
if(node != group1Child && node != group2Child) {
t.image->addNode(node);
......@@ -360,9 +360,9 @@ inline void addIfNotPresent(KisNodeSP node, CyclingTester &t, KisNodeSP group1Ch
*/
inline void testCyclingCase(CyclingTester &t, KisNodeSP group1Child, KisNodeSP group2Child, bool expected)
{
addIfNotPresent(t.groupLayer2, t, group1Child, group2Child);
addIfNotPresent(t.cloneOfGroup1, t, group1Child, group2Child);
addIfNotPresent(t.cloneOfGroup2, t, group1Child, group2Child);
addIfNotAnyOf(t.groupLayer2, t, group1Child, group2Child);
addIfNotAnyOf(t.cloneOfGroup1, t, group1Child, group2Child);
addIfNotAnyOf(t.cloneOfGroup2, t, group1Child, group2Child);
t.image->addNode(t.groupLayer1);
......@@ -382,7 +382,6 @@ void KisCloneLayerTest::testCyclingGroupLayer()
testCyclingCase(t, t.groupLayer2, t.cloneOfGroup1, false);
testCyclingCase(t, t.cloneOfGroup1, 0, false);
testCyclingCase(t, t.cloneOfGroup1, t.cloneOfGroup2, false);
testCyclingCase(t, t.cloneOfGroup2, 0, true);
testCyclingCase(t, t.cloneOfGroup2, t.cloneOfGroup1, false);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment