17 #define TT_NO_DEPRECATION_WARNINGS
25 int testAssertionCount = 0;
32 myDataspace.set(
TT(
"dataspace"),
TT(
"color"));
46 myDataspace.
set(
TT(
"inputUnit"),
TT(
"rgb"));
47 myDataspace.set(
TT(
"outputUnit"),
TT(
"rgb"));
59 myDataspace.send(
TT(
"convert"), v, v);
61 TTTestAssertion(
"rgb to rgb",
62 TTTestFloat64ArrayEquivalence(v, expected),
69 myDataspace.set(
TT(
"inputUnit"),
TT(
"cmy"));
70 myDataspace.set(
TT(
"outputUnit"),
TT(
"rgb"));
82 myDataspace.send(
TT(
"convert"), v, v);
84 TTTestAssertion(
"cmy to rgb",
85 TTTestFloat64ArrayEquivalence(v, expected),
92 myDataspace.set(
TT(
"inputUnit"),
TT(
"hsl"));
93 myDataspace.set(
TT(
"outputUnit"),
TT(
"rgb"));
105 myDataspace.send(
TT(
"convert"), v, v);
107 TTTestAssertion(
"hsl to rgb",
108 TTTestFloat64ArrayEquivalence(v, expected),
115 myDataspace.set(
TT(
"inputUnit"),
TT(
"rgb8"));
116 myDataspace.set(
TT(
"outputUnit"),
TT(
"rgb"));
128 myDataspace.send(
TT(
"convert"), v, v);
130 TTTestAssertion(
"rgb8 to rgb",
131 TTTestFloat64ArrayEquivalence(v, expected),
138 myDataspace.set(
TT(
"inputUnit"),
TT(
"hsv"));
139 myDataspace.set(
TT(
"outputUnit"),
TT(
"rgb"));
151 myDataspace.send(
TT(
"convert"), v, v);
153 TTTestAssertion(
"hsv to rgb",
154 TTTestFloat64ArrayEquivalence(v, expected),
169 myDataspace.set(
TT(
"inputUnit"),
TT(
"rgb"));
170 myDataspace.set(
TT(
"outputUnit"),
TT(
"cmy"));
182 myDataspace.send(
TT(
"convert"), v, v);
184 TTTestAssertion(
"rgb to cmy",
185 TTTestFloat64ArrayEquivalence(v, expected),
192 myDataspace.set(
TT(
"inputUnit"),
TT(
"rgb"));
193 myDataspace.set(
TT(
"outputUnit"),
TT(
"hsl"));
205 myDataspace.send(
TT(
"convert"), v, v);
207 TTTestAssertion(
"rgb to hsl",
208 TTTestFloat64ArrayEquivalence(v, expected),
215 myDataspace.set(
TT(
"inputUnit"),
TT(
"rgb"));
216 myDataspace.set(
TT(
"outputUnit"),
TT(
"rgb8"));
228 myDataspace.send(
TT(
"convert"), v, v);
230 TTTestAssertion(
"rgb to rgb8",
231 TTTestFloat64ArrayEquivalence(v, expected),
238 myDataspace.set(
TT(
"inputUnit"),
TT(
"rgb"));
239 myDataspace.set(
TT(
"outputUnit"),
TT(
"hsv"));
251 myDataspace.send(
TT(
"convert"), v, v);
253 TTTestAssertion(
"rgb to hsv",
254 TTTestFloat64ArrayEquivalence(v, expected),
262 testAssertionCount = 1;
265 return TTTestFinish(testAssertionCount, errorCount, returnedTestInfo);
Create and use Jamoma object instances.
double TTFloat64
64 bit floating point number
#define TT
This macro is defined as a shortcut for doing a lookup in the symbol table.
The ColorDataspace converts between different measurement units describing colors.
void set(const TTUInt16 index, const T &anElementValue)
DEPRECATED.
void TTFOUNDATION_EXPORT TTLogMessage(TTImmutableCString message,...)
Platform and host independent method for posting log messages.
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
void resize(size_type n)
Change the number of elements.
[doxygenAppendixC_copyExample]