| 7 | using namespace Exiv2; |
| 8 | |
| 9 | TEST(Error, parameterInsertion) { |
| 10 | const Error err_with_3_params(ErrorCode::kerGeneralError, "foo", "bar", "baz"); |
| 11 | ASSERT_STREQ(err_with_3_params.what(), "Error 1: arg2=bar, arg3=baz, arg1=foo."); |
| 12 | |
| 13 | const Error err_with_no_params(ErrorCode::kerSuccess); |
| 14 | ASSERT_STREQ(err_with_no_params.what(), "Success"); |
| 15 | } |
| 16 | |
| 17 | TEST(Error, tooManyParameters) { |
| 18 | const Error err_with_no_params(ErrorCode::kerSuccess, "a param", "another param"); |