Fix easyaccess-test

main
Miloš Komarčević 5 years ago
parent 95c0df6c14
commit 5e92d5e078

@ -19,7 +19,7 @@ struct EasyAccess {
static const EasyAccess easyAccess[] = { static const EasyAccess easyAccess[] = {
{ "Orientation", Exiv2::orientation }, { "Orientation", Exiv2::orientation },
{ "ISO speed", Exiv2::isoSpeed }, { "ISO speed", Exiv2::isoSpeed },
{ "Date & time (original)", Exiv2::dateTimeOriginal }, { "Date & time original", Exiv2::dateTimeOriginal },
{ "Flash bias", Exiv2::flashBias }, { "Flash bias", Exiv2::flashBias },
{ "Exposure mode", Exiv2::exposureMode }, { "Exposure mode", Exiv2::exposureMode },
{ "Scene mode", Exiv2::sceneMode }, { "Scene mode", Exiv2::sceneMode },
@ -70,7 +70,7 @@ try {
for (unsigned int i = 0; i < EXV_COUNTOF(easyAccess); ++i) { for (unsigned int i = 0; i < EXV_COUNTOF(easyAccess); ++i) {
Exiv2::ExifData::const_iterator pos = easyAccess[i].findFct_(ed); Exiv2::ExifData::const_iterator pos = easyAccess[i].findFct_(ed);
std::cout << std::setw(20) << std::left << easyAccess[i].label_; std::cout << std::setw(21) << std::left << easyAccess[i].label_;
if (pos != ed.end()) { if (pos != ed.end()) {
std::cout << " (" << std::setw(35) << pos->key() << ") : " std::cout << " (" << std::setw(35) << pos->key() << ") : "
<< pos->print(&ed) << "\n"; << pos->print(&ed) << "\n";

@ -186,7 +186,7 @@ namespace Exiv2 {
ExifData::const_iterator dateTimeOriginal(const ExifData& ed) ExifData::const_iterator dateTimeOriginal(const ExifData& ed)
{ {
static const char* keys[] = { static const char* keys[] = {
"Exif.Photo.DateTimeOriginal" "Exif.Photo.DateTimeOriginal",
"Exif.Image.DateTimeOriginal" "Exif.Image.DateTimeOriginal"
}; };
return findMetadatum(ed, keys, EXV_COUNTOF(keys)); return findMetadatum(ed, keys, EXV_COUNTOF(keys));

@ -16,28 +16,40 @@ class EasyaccessTest(metaclass=system_tests.CaseMeta):
"""File 1/1: $filename """File 1/1: $filename
Set Exif.Image.Make "Samsung" (Ascii) Set Exif.Image.Make "Samsung" (Ascii)
""", """,
"""Orientation ( ) : """Orientation ( ) :
ISO speed ( ) : ISO speed ( ) :
Flash bias ( ) : Date & time original ( ) :
Exposure mode ( ) : Flash bias ( ) :
Scene mode ( ) : Exposure mode ( ) :
Macro mode ( ) : Scene mode ( ) :
Image quality ( ) : Macro mode ( ) :
White balance ( ) : Image quality ( ) :
Lens name ( ) : White balance ( ) :
Saturation ( ) : Lens name ( ) :
Sharpness ( ) : Saturation ( ) :
Contrast ( ) : Sharpness ( ) :
Scene capture type ( ) : Contrast ( ) :
Metering mode ( ) : Scene capture type ( ) :
Camera make (Exif.Image.Make ) : Samsung Metering mode ( ) :
Camera model ( ) : Camera make (Exif.Image.Make ) : Samsung
Exposure time ( ) : Camera model ( ) :
FNumber ( ) : Exposure time ( ) :
Subject distance ( ) : FNumber ( ) :
Camera serial number ( ) : Shutter speed value ( ) :
Focal length ( ) : Aperture value ( ) :
AF point ( ) : Brightness value ( ) :
Exposure bias ( ) :
Max aperture value ( ) :
Subject distance ( ) :
Light source ( ) :
Flash ( ) :
Camera serial number ( ) :
Focal length ( ) :
Subject location/area ( ) :
Flash energy ( ) :
Exposure index ( ) :
Sensing method ( ) :
AF point ( ) :
""" """
] ]
stderr = [""] * 2 stderr = [""] * 2

Loading…
Cancel
Save