00076 {
00077
00078
00079
InitializeMagick(*argv);
00080
00081
int failures=0;
00082
00083
try {
00084
00085
CoderInfo coderInfo(
"GIF");
00086
if ( coderInfo.
name() != string(
"GIF") )
00087 {
00088 cout <<
"Unexpected coder name \""
00089 << coderInfo.
name()
00090 <<
"\""
00091 << endl;
00092 ++failures;
00093 }
00094
00095
if( coderInfo.description() != string(
"CompuServe graphics interchange format") )
00096 {
00097 cout <<
"Unexpected coder description \""
00098 << coderInfo.description()
00099 <<
"\""
00100 << endl;
00101 ++failures;
00102 }
00103
00104 failures +=
test(CoderInfo::AnyMatch,CoderInfo::AnyMatch,CoderInfo::AnyMatch);
00105 failures +=
test(CoderInfo::FalseMatch,CoderInfo::FalseMatch,CoderInfo::FalseMatch);
00106
00107 failures +=
test(CoderInfo::TrueMatch,CoderInfo::AnyMatch,CoderInfo::AnyMatch);
00108 failures +=
test(CoderInfo::FalseMatch,CoderInfo::AnyMatch,CoderInfo::AnyMatch);
00109
00110 failures +=
test(CoderInfo::AnyMatch,CoderInfo::TrueMatch,CoderInfo::AnyMatch);
00111 failures +=
test(CoderInfo::AnyMatch,CoderInfo::FalseMatch,CoderInfo::AnyMatch);
00112
00113 failures +=
test(CoderInfo::AnyMatch,CoderInfo::AnyMatch,CoderInfo::TrueMatch);
00114 failures +=
test(CoderInfo::AnyMatch,CoderInfo::AnyMatch,CoderInfo::FalseMatch);
00115 }
00116
catch( Exception &error_ )
00117 {
00118 cout <<
"Caught exception: " << error_.what() << endl;
00119
return 1;
00120 }
00121
catch(
exception &error_ )
00122 {
00123 cout <<
"Caught exception: " << error_.what() << endl;
00124
return 1;
00125 }
00126
00127
if ( failures )
00128 {
00129 cout << failures <<
" failures" << endl;
00130
return 1;
00131 }
00132
00133
return 0;
00134 }