// SPDX-License-Identifier: GPL-2.0-or-later /** @file * Test for https://gitlab.com/inkscape/inkscape/-/issues/3393 *//* * * Authors: * Thomas Holder * * Copyright (C) 2022 Authors * * Released under GNU GPL version 2 or later, read the file 'COPYING' for more information */ #include #include #include #include using namespace Inkscape; static char const *const docString = R"""( )"""; TEST_F(DocPerCaseTest, PathReverse) { auto doc = std::unique_ptr(SPDocument::createNewDocFromMem(docString, strlen(docString), false)); doc->ensureUpToDate(); auto path1 = cast(doc->getObjectById("path1")); auto oset = ObjectSet(doc.get()); oset.add(path1); ASSERT_EQ(*path1->curve()->first_point(), Geom::Point(5, 5)); oset.pathReverse(); ASSERT_EQ(*path1->curve()->first_point(), Geom::Point(15, 15)); }