svg-color-test.h revision fac1e803300de05ddcf08e45de0b8a24c1858e70
#include <cxxtest/TestSuite.h>
#include <cassert>
#include <cstdlib>
#include "preferences.h"
#include "svg/svg-color.h"
#include "svg/svg-icc-color.h"
{
struct simpleIccCase {
unsigned numEntries;
bool shouldPass;
char const* name;
char const* str;
};
void check_rgb24(unsigned const rgb24)
{
char css[8];
rgb24 << 8);
rgb24 << 8);
}
// createSuite and destroySuite get us per-suite setup and teardown
// without us having to worry about static initialization order, etc.
void testWrite()
{
unsigned tmp = i;
unsigned rgb24 = 0;
for (unsigned c = 0; c < 3; ++c) {
}
}
/* And a few completely random ones. */
for (unsigned i = 500; i--;) { /* Arbitrary number of iterations. */
}
}
void testReadColor()
{
for(size_t i=0; i<n; i++) {
}
}
void testIccColor()
{
simpleIccCase cases[] = {
{1, true, "named", "icc-color(named, 3)"},
{0, false, "", "foodle"},
{1, true, "a", "icc-color(a, 3)"},
{4, true, "named", "icc-color(named, 3, 0, 0.1, 2.5)"},
{0, false, "", "icc-color(named, 3"},
{0, false, "", "icc-color(space named, 3)"},
{0, false, "", "icc-color(tab\tnamed, 3)"},
{0, false, "", "icc-color(0name, 3)"},
{0, false, "", "icc-color(-name, 3)"},
{1, true, "positive", "icc-color(positive, +3)"},
{1, true, "negative", "icc-color(negative, -3)"},
{1, true, "positive", "icc-color(positive, +0.1)"},
{1, true, "negative", "icc-color(negative, -0.1)"},
{0, false, "", "icc-color(named, value)"},
{1, true, "hyphen-name", "icc-color(hyphen-name, 1)"},
{1, true, "under_name", "icc-color(under_name, 1)"},
};
if ( cases[i].shouldPass ) {
} else {
}
}
}
};
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :