From 35a96bde514a8897f6f0fcc41c5833bf63df2e2a Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 27 Apr 2024 18:29:01 +0200 Subject: Adding upstream version 1.0.2. Signed-off-by: Daniel Baumann --- testfiles/src/sp-item-group-test.cpp | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 testfiles/src/sp-item-group-test.cpp (limited to 'testfiles/src/sp-item-group-test.cpp') diff --git a/testfiles/src/sp-item-group-test.cpp b/testfiles/src/sp-item-group-test.cpp new file mode 100644 index 0000000..3439f54 --- /dev/null +++ b/testfiles/src/sp-item-group-test.cpp @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/** @file + * SPGroup test + *//* + * Authors: see git history + * + * Copyright (C) 2020 Authors + * + * Released under GNU GPL version 2 or later, read the file 'COPYING' for more information + */ + +#include +#include +#include +#include +#include + +using namespace Inkscape; +using namespace Inkscape::LivePathEffect; + +class SPGroupTest : public ::testing::Test { + protected: + void SetUp() override + { + // setup hidden dependency + Application::create(false); + } +}; + +TEST_F(SPGroupTest, applyingPowerClipEffectToGroupWithoutClipIsIgnored) +{ + std::string svg("\ +\ + \ + \ + \ + \ +"); + + SPDocument *doc = SPDocument::createNewDocFromMem(svg.c_str(), svg.size(), true); + + auto group = dynamic_cast(doc->getObjectById("group1")); + Effect::createAndApply(POWERCLIP, doc, group); + + ASSERT_FALSE(group->hasPathEffect()); +} -- cgit v1.2.3