From cad9a5f5d97198a17182d00420f726820fd02d1d Mon Sep 17 00:00:00 2001 From: dirk Date: Sat, 11 Jan 2014 18:02:29 +0000 Subject: [PATCH] Fixed test build. --- Magick++/tests/attributes.cpp | 89 +++++++++---------------------- Magick++/tests/colorHistogram.cpp | 6 +-- 2 files changed, 28 insertions(+), 67 deletions(-) diff --git a/Magick++/tests/attributes.cpp b/Magick++/tests/attributes.cpp index 7aa2866ac..b10db4b12 100644 --- a/Magick++/tests/attributes.cpp +++ b/Magick++/tests/attributes.cpp @@ -813,14 +813,14 @@ int main( int /*argc*/, char ** argv) } // Test set/get - image.gifDisposeMethod(4); - if ( image.gifDisposeMethod() != 4 ) + image.gifDisposeMethod(BackgroundDispose); + if ( image.gifDisposeMethod() != BackgroundDispose ) { ++failures; cout << "Line: " << __LINE__ << ", gifDisposeMethod set/get failed" << endl; } - image.gifDisposeMethod(0); + image.gifDisposeMethod(UndefinedDispose); // // interlaceType @@ -869,24 +869,24 @@ int main( int /*argc*/, char ** argv) } // - // lineWidth + // strokeWidth // // Test default - if ( image.lineWidth() != 1 ) + if ( image.strokeWidth() != 1 ) { ++failures; cout << "Line: " << __LINE__ - << ", lineWidth default is not 1 as expected" << endl; + << ", strokeWidth default is not 1 as expected" << endl; } // Test set/get - image.lineWidth(2); - if ( image.lineWidth() != 2 ) + image.strokeWidth(2); + if ( image.strokeWidth() != 2 ) { ++failures; - cout << "Line: " << __LINE__ << ", lineWidth set/get failed" << endl; + cout << "Line: " << __LINE__ << ", strokeWidth set/get failed" << endl; } - image.lineWidth(1); + image.strokeWidth(1); // // magick @@ -910,48 +910,48 @@ int main( int /*argc*/, char ** argv) image.magick("XC"); // - // matte + // alpha // // Test default - if ( image.matte() != false ) + if ( image.alpha() != false ) { ++failures; cout << "Line: " << __LINE__ - << ", matte default is not false as expected" << endl; + << ", alpha default is not false as expected" << endl; } // Test set/get - image.matte(true); - if ( image.matte() != true ) + image.alpha(true); + if ( image.alpha() != true ) { ++failures; - cout << "Line: " << __LINE__ << ", matte set/get failed" << endl; + cout << "Line: " << __LINE__ << ", alpha set/get failed" << endl; } - image.matte(false); + image.alpha(false); // - // matteColor + // alphaColor // // Test default - if ( image.matteColor() != Color("#BDBDBD") ) + if ( image.alphaColor() != Color("#BDBDBD") ) { ++failures; cout << "Line: " << __LINE__ - << ", matteColor default is not #BDBDBD as expected" << endl; + << ", alphaColor default is not #BDBDBD as expected" << endl; } // Test set/get - image.matteColor(ColorRGB(0.5,0.5,1)); - if ( image.matteColor() != ColorRGB(0.5,0.5,1) ) + image.alphaColor(ColorRGB(0.5,0.5,1)); + if ( image.alphaColor() != ColorRGB(0.5,0.5,1) ) { ++failures; - cout << "Line: " << __LINE__ << ", matteColor set/get failed" << endl; + cout << "Line: " << __LINE__ << ", alphaColor set/get failed" << endl; } // Test unset - image.matteColor( Color() ); + image.alphaColor( Color() ); - image.matteColor("#BDBDBD"); + image.alphaColor("#BDBDBD"); // // meanErrorPerPixel @@ -1024,19 +1024,6 @@ int main( int /*argc*/, char ** argv) << ", normalizedMeanError is not zero as expected" << endl; } - // - // penColor - // - - image.penColor(ColorRGB(0.5,0.5,1)); - if ( image.penColor() != ColorRGB(0.5,0.5,1) ) - { - ++failures; - cout << "Line: " << __LINE__ << ", penColor (" - << string(image.penColor()) - << ") set/get failed" << endl; - } - // // strokeColor // @@ -1363,32 +1350,6 @@ int main( int /*argc*/, char ** argv) } image.subRange(0); - // - // tileName - // - if ( image.tileName().length() != 0 ) - { - ++failures; - cout << "Line: " << __LINE__ - << ", tileName default is not empty string as expected" << endl; - } - - image.tileName("How now brown cow?"); - if ( image.tileName() != "How now brown cow?" ) - { - ++failures; - cout << "Line: " << __LINE__ - << ", tileName set/get failed" << endl; - } - - image.tileName( string() ); - if ( image.tileName().length() != 0 ) - { - ++failures; - cout << "Line: " << __LINE__ - << ", tileName failed to unset" << endl; - } - // // totalColors // diff --git a/Magick++/tests/colorHistogram.cpp b/Magick++/tests/colorHistogram.cpp index 4418eacc9..3085a0931 100644 --- a/Magick++/tests/colorHistogram.cpp +++ b/Magick++/tests/colorHistogram.cpp @@ -71,9 +71,9 @@ int main( int /*argc*/, char ** argv) while (p != histogram.end()) { cout << setw(10) << (int)p->second << ": (" - << setw(quantum_width) << (int)p->first.redQuantum() << "," - << setw(quantum_width) << (int)p->first.greenQuantum() << "," - << setw(quantum_width) << (int)p->first.blueQuantum() << ")" + << setw(quantum_width) << (int)p->first.quantumRed() << "," + << setw(quantum_width) << (int)p->first.quantumGreen() << "," + << setw(quantum_width) << (int)p->first.quantumBlue() << ")" << endl; p++; } -- 2.40.0