summaryrefslogtreecommitdiffstats
path: root/testfiles/src/sp-glyph-kerning-test.cpp
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:24:48 +0000
commitcca66b9ec4e494c1d919bff0f71a820d8afab1fa (patch)
tree146f39ded1c938019e1ed42d30923c2ac9e86789 /testfiles/src/sp-glyph-kerning-test.cpp
parentInitial commit. (diff)
downloadinkscape-cca66b9ec4e494c1d919bff0f71a820d8afab1fa.tar.xz
inkscape-cca66b9ec4e494c1d919bff0f71a820d8afab1fa.zip
Adding upstream version 1.2.2.upstream/1.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testfiles/src/sp-glyph-kerning-test.cpp')
-rw-r--r--testfiles/src/sp-glyph-kerning-test.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/testfiles/src/sp-glyph-kerning-test.cpp b/testfiles/src/sp-glyph-kerning-test.cpp
new file mode 100644
index 0000000..2c737ee
--- /dev/null
+++ b/testfiles/src/sp-glyph-kerning-test.cpp
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/** @file
+ * SPGlyphKerning test
+ *//*
+ *
+ * Authors:
+ * Cosmin Dancu
+ *
+ * Copyright (C) 2020 Authors
+ *
+ * Released under GNU GPL version 2 or later, read the file 'COPYING' for more information
+ */
+
+#include <gtest/gtest.h>
+#include <src/object/sp-glyph-kerning.h>
+
+TEST(SPGlyphKerningTest, EmptyGlyphNamesDoNotContainAnything) {
+ GlyphNames empty_glyph_names(nullptr);
+ ASSERT_FALSE(empty_glyph_names.contains("foo"));
+}
+
+TEST(SPGlyphKerningTest, GlyphNamesContainEachName) {
+ GlyphNames glyph_names("name1 name2");
+ ASSERT_TRUE(glyph_names.contains("name1"));
+ ASSERT_TRUE(glyph_names.contains("name2"));
+}