| // This may look like C code, but it is really -*- C++ -*- |
| // Copyright Dirk Lemstra 2015 |
| // Test Magick::Geometry class |
| int main(int, char **argv) |
| // Initialize ImageMagick install location for Windows |
| // Verify conversion from and to string |
| string input="100x50+10-5!"; |
| Geometry geometry(input); |
| if ((geometry.width() != 100) || (geometry.height() != 50) || |
| (geometry.xOff() != 10) || (geometry.yOff() != -5) || |
| (geometry.aspect() == false)) |
| cout << "Line: " << __LINE__ |
| << " Conversion from " << input << " failed" |
| cout << "Line: " << __LINE__ |
| << " Output " << output << " is not the same as " << input |
| catch( Exception &error_ ) |
| cout << "Caught exception: " << error_.what() << endl; |
| catch( exception &error_ ) |
| cout << "Caught exception: " << error_.what() << endl; |
| cout << failures << " failures" << endl; |