diff --git a/src/attributes-test.h b/src/attributes-test.h
index acd1fc4040029fff4baaed00e98477259ef4af1e..1d8f32843c955b24ab31e39480dd188fda70364c 100644 (file)
--- a/src/attributes-test.h
+++ b/src/attributes-test.h
+#ifndef SEEN_ATTRIBUTES_TEST_H
+#define SEEN_ATTRIBUTES_TEST_H
+
#include <cxxtest/TestSuite.h>
#include <vector>
-#include "utest/utest.h"
+#include <glib.h>
+#include <glib/gprintf.h>
#include "attributes.h"
#include "streq.h"
{"begin", true},
{"additive", true},
{"font", true},
+ {"-inkscape-font-specification", true}, // TODO look into this attribute's name
{"marker", true},
{"line-height", true},
- {"accent-height", false},
+ {"accent-height", true},
{"accumulate", true},
{"alignment-baseline", true},
- {"alphabetic", false},
- {"amplitude", false},
+ {"alphabetic", true},
+ {"amplitude", true},
{"animate", false},
- {"arabic-form", false},
- {"ascent", false},
+ {"arabic-form", true},
+ {"ascent", true},
{"attributeType", true},
- {"azimuth", false},
- {"baseFrequency", false},
+ {"azimuth", true},
+ {"baseFrequency", true},
{"baseline-shift", true},
{"baseProfile", false},
- {"bbox", false},
- {"bias", false},
+ {"bbox", true},
+ {"bias", true},
{"block-progression", true},
{"by", true},
{"calcMode", true},
- {"cap-height", false},
+ {"cap-height", true},
{"class", false},
{"clip", true},
{"clip-path", true},
{"cx", true},
{"cy", true},
{"d", true},
- {"descent", false},
- {"diffuseConstant", false},
+ {"descent", true},
+ {"diffuseConstant", true},
{"direction", true},
{"display", true},
- {"divisor", false},
+ {"divisor", true},
{"dominant-baseline", true},
{"dur", true},
{"dx", true},
{"dy", true},
- {"edgeMode", false},
- {"elevation", false},
+ {"edgeMode", true},
+ {"elevation", true},
{"enable-background", true},
{"end", true},
- {"exponent", false},
+ {"exponent", true},
{"externalResourcesRequired", false},
+ {"feBlend", false},
{"feColorMatrix", false},
+ {"feComponentTransfer", false},
{"feComposite", false},
+ {"feConvolveMatrix", false},
+ {"feDiffuseLighting", false},
+ {"feDisplacementMap", false},
+ {"feFlood", false},
{"feGaussianBlur", false},
+ {"feImage", false},
+ {"feMerge", false},
{"feMorphology", false},
+ {"feOffset", false},
+ {"feSpecularLighting", false},
{"feTile", false},
{"fill", true},
{"fill-opacity", true},
{"fill-rule", true},
{"filter", true},
- {"filterRes", false},
- {"filterUnits", false},
+ {"filterRes", true},
+ {"filterUnits", true},
{"flood-color", true},
{"flood-opacity", true},
{"font-family", true},
{"from", true},
{"fx", true},
{"fy", true},
- {"g1", false},
- {"g2", false},
- {"glyph-name", false},
+ {"g1", true},
+ {"g2", true},
+ {"glyph-name", true},
{"glyph-orientation-horizontal", true},
{"glyph-orientation-vertical", true},
{"glyphRef", false},
{"gradientTransform", true},
{"gradientUnits", true},
- {"hanging", false},
+ {"hanging", true},
{"height", true},
- {"horiz-adv-x", false},
- {"horiz-origin-x", false},
- {"horiz-origin-y", false},
- {"ideographic", false},
+ {"horiz-adv-x", true},
+ {"horiz-origin-x", true},
+ {"horiz-origin-y", true},
+ {"ideographic", true},
{"image-rendering", true},
- {"in", false},
- {"in2", false},
- {"intercept", false},
- {"k", false},
- {"k1", false},
- {"k2", false},
- {"k3", false},
- {"k4", false},
- {"kernelMatrix", false},
- {"kernelUnitLength", false},
+ {"in", true},
+ {"in2", true},
+ {"intercept", true},
+ {"k", true},
+ {"k1", true},
+ {"k2", true},
+ {"k3", true},
+ {"k4", true},
+ {"kernelMatrix", true},
+ {"kernelUnitLength", true},
{"kerning", true},
{"keyPoints", false},
{"keySplines", true},
{"keyTimes", true},
- {"lang", false},
+ {"lang", true},
{"lengthAdjust", false},
{"letter-spacing", true},
{"lighting-color", true},
- {"limitingConeAngle", false},
- {"local", false},
+ {"limitingConeAngle", true},
+ {"local", true},
{"marker-end", true},
{"marker-mid", true},
{"marker-start", true},
{"mask", true},
{"maskContentUnits", true},
{"maskUnits", true},
- {"mathematical", false},
+ {"mathematical", true},
{"max", true},
{"media", false},
{"method", false},
{"min", true},
- {"mode", false},
- {"name", false},
- {"numOctaves", false},
+ {"mode", true},
+ {"name", true},
+ {"numOctaves", true},
{"offset", true},
{"onabort", false},
{"onactivate", false},
{"onerror", false},
{"onfocusin", false},
{"onfocusout", false},
- {"onload", false},
+ {"onload", true},
{"onmousedown", false},
{"onmousemove", false},
{"onmouseout", false},
{"onunload", false},
{"onzoom", false},
{"opacity", true},
- {"operator", false},
- {"order", false},
+ {"operator", true},
+ {"order", true},
{"orient", true},
{"orientation", true},
{"origin", false},
{"overflow", true},
- {"overline-position", false},
- {"overline-thickness", false},
- {"panose-1", false},
+ {"overline-position", true},
+ {"overline-thickness", true},
+ {"panose-1", true},
{"path", false},
{"pathLength", false},
{"patternContentUnits", true},
{"patternUnits", true},
{"pointer-events", true},
{"points", true},
- {"pointsAtX", false},
- {"pointsAtY", false},
- {"pointsAtZ", false},
- {"preserveAlpha", false},
+ {"pointsAtX", true},
+ {"pointsAtY", true},
+ {"pointsAtZ", true},
+ {"preserveAlpha", true},
{"preserveAspectRatio", true},
- {"primitiveUnits", false},
+ {"primitiveUnits", true},
{"r", true},
- {"radius", false},
+ {"radius", true},
{"refX", true},
{"refY", true},
- {"rendering-intent", false},
+ {"rendering-intent", true},
{"repeatCount", true},
{"repeatDur", true},
- {"requiredExtensions", false},
+ {"requiredFeatures", true},
+ {"requiredExtensions", true},
{"restart", true},
- {"result", false},
+ {"result", true},
{"rotate", true},
{"rx", true},
{"ry", true},
- {"scale", false},
- {"seed", false},
+ {"scale", true},
+ {"seed", true},
{"shape-rendering", true},
- {"slope", false},
+ {"slope", true},
{"spacing", false},
- {"specularConstant", false},
- {"specularExponent", false},
+ {"specularConstant", true},
+ {"specularExponent", true},
{"spreadMethod", true},
{"startOffset", true},
- {"stdDeviation", false},
- {"stemh", false},
- {"stemv", false},
- {"stitchTiles", false},
+ {"stdDeviation", true},
+ {"stemh", true},
+ {"stemv", true},
+ {"stitchTiles", true},
{"stop-color", true},
{"stop-opacity", true},
- {"strikethrough-position", false},
- {"strikethrough-thickness", false},
+ {"strikethrough-position", true},
+ {"strikethrough-thickness", true},
{"stroke", true},
{"stroke-dasharray", true},
{"stroke-dashoffset", true},
{"stroke-opacity", true},
{"stroke-width", true},
{"style", true},
- {"surfaceScale", false},
- {"systemLanguage", false},
- {"tableValues", false},
+ {"surfaceScale", true},
+ {"systemLanguage", true},
+ {"tableValues", true},
{"target", true},
- {"targetX", false},
- {"targetY", false},
+ {"targetX", true},
+ {"targetY", true},
{"text-align", true},
{"text-anchor", true},
{"text-decoration", true},
{"to", true},
{"transform", true},
{"type", true},
- {"u1", false},
- {"u2", false},
- {"underline-position", false},
- {"underline-thickness", false},
- {"unicode", false},
+ {"u1", true},
+ {"u2", true},
+ {"underline-position", true},
+ {"underline-thickness", true},
+ {"unicode", true},
{"unicode-bidi", true},
- {"unicode-range", false},
- {"units-per-em", false},
- {"v-alphabetic", false},
- {"v-hanging", false},
- {"v-ideographic", false},
- {"v-mathematical", false},
+ {"unicode-range", true},
+ {"units-per-em", true},
+ {"v-alphabetic", true},
+ {"v-hanging", true},
+ {"v-ideographic", true},
+ {"v-mathematical", true},
{"values", true},
{"version", true},
- {"vert-adv-y", false},
- {"vert-origin-x", false},
- {"vert-origin-y", false},
+ {"vert-adv-y", true},
+ {"vert-origin-x", true},
+ {"vert-origin-y", true},
{"viewBox", true},
{"viewTarget", false},
{"visibility", true},
{"width", true},
- {"widths", false},
+ {"widths", true},
{"word-spacing", true},
{"writing-mode", true},
{"x", true},
- {"x-height", false},
+ {"x-height", true},
{"x1", true},
{"x2", true},
- {"xChannelSelector", false},
+ {"xChannelSelector", true},
{"xlink:actuate", true},
{"xlink:arcrole", true},
{"xlink:href", true},
{"y", true},
{"y1", true},
{"y2", true},
- {"yChannelSelector", false},
- {"z", false},
+ {"yChannelSelector", true},
+ {"z", true},
{"zoomAndPan", false},
/* Extra attributes. */
{"sodipodi:insensitive", true},
{"sodipodi:nonprintable", true},
{"inkscape:groupmode", true},
- {"sodipodi:version", true},
+ {"sodipodi:version", false},
{"inkscape:version", true},
- {"inkscape:object-bbox", true},
- {"inkscape:object-points", true},
{"inkscape:object-paths", true},
{"inkscape:object-nodes", true},
+ {"inkscape:bbox-paths", true},
+ {"inkscape:bbox-nodes", true},
+ {"inkscape:snap-page", true},
+ {"inkscape:snap-global", true},
+ {"inkscape:snap-bbox", true},
+ {"inkscape:snap-nodes", true},
+ {"inkscape:snap-from-guide", true},
+ {"inkscape:snap-center", true},
+ {"inkscape:snap-smooth-nodes", true},
+ {"inkscape:snap-midpoints", true},
+ {"inkscape:snap-object-midpoints", true},
+ {"inkscape:snap-bbox-edge-midpoints", true},
+ {"inkscape:snap-bbox-midpoints", true},
+ //{"inkscape:snap-intersection-grid-guide", true},
+ {"inkscape:snap-grids", true},
+ {"inkscape:snap-to-guides", true},
+ {"inkscape:snap-intersection-paths", true},
+ {"inkscape:original-d", true},
{"inkscape:pageopacity", true},
{"inkscape:pageshadow", true},
+ {"inkscape:path-effect", true},
{"inkscape:transform-center-x", true},
{"inkscape:transform-center-y", true},
{"inkscape:zoom", true},
{"inkscape:window-height", true},
{"inkscape:window-x", true},
{"inkscape:window-y", true},
- {"inkscape:grid-bbox", true},
- {"inkscape:guide-bbox", true},
- {"inkscape:grid-points", true},
- {"inkscape:guide-points", true},
+ {"inkscape:window-maximized", true},
{"inkscape:current-layer", true},
{"inkscape:connector-type", true},
{"inkscape:connection-start", true},
{"sodipodi:cy", true},
{"sodipodi:rx", true},
{"sodipodi:ry", true},
+ {"inkscape:perspectiveID", true},
+ {"inkscape:corner0", true},
+ {"inkscape:corner7", true},
+ {"inkscape:box3dsidetype", true},
+ {"inkscape:persp3d", true},
+ {"inkscape:vp_x", true},
+ {"inkscape:vp_y", true},
+ {"inkscape:vp_z", true},
+ {"inkscape:persp3d-origin", true},
{"sodipodi:start", true},
{"sodipodi:end", true},
{"sodipodi:open", true},
/* SPNamedView */
{"viewonly", true},
{"showgrid", true},
+// {"gridtype", true},
{"showguides", true},
{"gridtolerance", true},
{"guidetolerance", true},
- {"gridoriginx", true},
+ {"objecttolerance", true},
+/* {"gridoriginx", true},
{"gridoriginy", true},
{"gridspacingx", true},
{"gridspacingy", true},
+ {"gridanglex", true},
+ {"gridanglez", true},
{"gridcolor", true},
{"gridopacity", true},
{"gridempcolor", true},
{"gridempopacity", true},
- {"gridempspacing", true},
+ {"gridempspacing", true}, */
{"guidecolor", true},
{"guideopacity", true},
{"guidehicolor", true},
unsigned const n_ids = ids.size();
for (unsigned id = 1; id < n_ids; ++id) {
if (!ids[id]) {
- TS_WARN( std::string((const char*)sp_attribute_name(id)) );
+ gchar* tmp = g_strdup_printf( "Attribute string with enum %d {%s} not handled", id, sp_attribute_name(id) );
+ TS_WARN( std::string((const char*)tmp) );
+ g_free( tmp );
found = true;
}
}
TS_ASSERT(!found);
+
+ for ( unsigned int index = 1; index < n_ids; index++ ) {
+ guchar const* name = sp_attribute_name(index);
+ unsigned int postLookup = sp_attribute_lookup( reinterpret_cast<gchar const*>(name) );
+ TSM_ASSERT_EQUALS( std::string("Enum round-trip through string {") + (char const*)name + "} failed.", index, postLookup );
+ }
+
}
};
+#endif // SEEN_ATTRIBUTES_TEST_H
+
/*
Local Variables:
mode:c++