summaryrefslogtreecommitdiffstats
path: root/testfiles
diff options
context:
space:
mode:
authorThomas Holder <thomas@thomas-holder.de>2018-10-06 13:28:39 +0000
committerThomas Holder <thomas@thomas-holder.de>2018-10-06 13:28:39 +0000
commit03c35f6065f45346634cdcd8a9d13e4f167549c0 (patch)
tree3a892c439d37cff565592d93e124137e70a42c31 /testfiles
parentAdd new style register style property for stop color and opacity (diff)
downloadinkscape-03c35f6065f45346634cdcd8a9d13e4f167549c0.tar.gz
inkscape-03c35f6065f45346634cdcd8a9d13e4f167549c0.zip
SPAttributeEnum typed function arguments
Diffstat (limited to 'testfiles')
-rw-r--r--testfiles/src/attributes-test.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/testfiles/src/attributes-test.cpp b/testfiles/src/attributes-test.cpp
index 34963f22d..c211fadb5 100644
--- a/testfiles/src/attributes-test.cpp
+++ b/testfiles/src/attributes-test.cpp
@@ -550,7 +550,7 @@ std::vector<size_t> getIdIds()
std::vector<AttributeInfo> all_attrs = getKnownAttrs();
ids.reserve(all_attrs.size()); // minimize memory thrashing
for (AttrItr it(all_attrs.begin()); it != all_attrs.end(); ++it) {
- unsigned int id = sp_attribute_lookup(it->attr.c_str());
+ auto id = sp_attribute_lookup(it->attr.c_str());
if (id >= ids.size()) {
ids.resize(id + 1);
}
@@ -565,7 +565,7 @@ TEST(AttributesTest, SupportedKnown)
{
std::vector<AttributeInfo> all_attrs = getKnownAttrs();
for (AttrItr it(all_attrs.begin()); it != all_attrs.end(); ++it) {
- unsigned int id = sp_attribute_lookup(it->attr.c_str());
+ auto id = sp_attribute_lookup(it->attr.c_str());
EXPECT_EQ(it->supported, id != 0u) << "Matching for attribute '" << it->attr << "'";
}
}
@@ -576,8 +576,8 @@ TEST(AttributesTest, NameRoundTrip)
std::vector<AttributeInfo> all_attrs = getKnownAttrs();
for (AttrItr it(all_attrs.begin()); it != all_attrs.end(); ++it) {
if (it->supported) {
- unsigned int id = sp_attribute_lookup(it->attr.c_str());
- char const *redoneName = reinterpret_cast<char const *>(sp_attribute_name(id));
+ auto id = sp_attribute_lookup(it->attr.c_str());
+ char const *redoneName = sp_attribute_name(id);
EXPECT_TRUE(redoneName != NULL) << "For attribute '" << it->attr << "'";
if (redoneName) {
EXPECT_EQ(it->attr, redoneName);
@@ -615,7 +615,7 @@ TEST(AttributesTest, ValuesAreKnown)
std::vector<size_t> ids = getIdIds();
for (size_t i = FIRST_VALID_ID; i < ids.size(); ++i) {
if (!ids[i]) {
- unsigned char const *name = sp_attribute_name(i);
+ char const *name = sp_attribute_name((SPAttributeEnum)i);
EXPECT_TRUE(ids[i] > 0) << "Attribute string with enum " << i << " {" << name << "} not handled";
}
}
@@ -627,7 +627,7 @@ TEST(AttributesTest, ValuesUnique)
std::vector<size_t> ids = getIdIds();
for (size_t i = FIRST_VALID_ID; i < ids.size(); ++i) {
EXPECT_LE(ids[i], size_t(1)) << "Attribute enum " << i << " used for multiple strings"
- << " including {" << sp_attribute_name(i) << "}";
+ << " including {" << sp_attribute_name((SPAttributeEnum)i) << "}";
}
}