[SCM] exiv2 packaging branch, master, updated. debian/0.25-3.1-3734-gdcbc29a

Maximiliano Curia maxy at moszumanska.debian.org
Thu Jul 13 17:36:35 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/kde-extras/exiv2.git;a=commitdiff;h=aac2f38

The following commit has been merged in the master branch:
commit aac2f38d4a575cb108876412ea26eea105a9f02b
Author: Andreas Huggel <ahuggel at gmx.net>
Date:   Sat Sep 4 06:45:42 2004 +0000

    Added key-test.cpp
---
 src/Makefile     |   4 +-
 src/key-test.cpp | 211 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 213 insertions(+), 2 deletions(-)

diff --git a/src/Makefile b/src/Makefile
index f49c639..96ae682 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -20,7 +20,7 @@
 # 02111-1307, USA.
 #
 # File:      Makefile
-# Version:   Exiv2-0_4_040703 1.27
+# Version:   $Name:  $ $Revision: 1.32 $
 # Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
 # History:   10-Dec-03, ahu: created
 #
@@ -57,7 +57,7 @@ CCSRC = canonmn.cpp datasets.cpp exif.cpp fujimn.cpp ifd.cpp image.cpp iptc.cpp
 
 # Add source files of simple applications to this list
 BINSRC = addmoddel.cpp exifcomment.cpp exifprint.cpp ifd-test.cpp iptcprint.cpp \
-         iptctest.cpp makernote-test.cpp taglist.cpp write-test.cpp \
+         iptctest.cpp key-test.cpp makernote-test.cpp taglist.cpp write-test.cpp \
          write2-test.cpp 
 
 # State the main source file of the Exiv2 application here
diff --git a/src/key-test.cpp b/src/key-test.cpp
new file mode 100644
index 0000000..bcd00bf
--- /dev/null
+++ b/src/key-test.cpp
@@ -0,0 +1,211 @@
+// ***************************************************************** -*- C++ -*-
+/*
+  Abstract : Key unit tests 
+
+  File     : key-test.cpp
+  Version  : $Name:  $ $Revision: 1.1 $
+  Author(s): Andreas Huggel (ahu) <ahuggel at gmx.net>
+  History  : 24-Aug-04, ahu: created
+
+ */
+// *****************************************************************************
+// included header files
+#include "exif.hpp"
+#include <iostream>
+#include <string>
+
+using namespace Exiv2;
+
+int main()
+{
+    int tc = 0;
+    int rc = 0;
+
+    std::string key("Exif.Iop.InteroperabilityVersion");
+    ExifKey ek(key);
+
+    // operator<<
+    tc += 1;
+    std::ostringstream os;
+    os << ek;
+    if (os.str() != key) {
+        std::cout << "Testcase failed (operator<<)" << std::endl;
+        rc += 1; 
+    }
+    // familyName
+    tc += 1;
+    if (std::string(ek.familyName()) != "Exif") {
+        std::cout << "Testcase failed (familyName)" << std::endl;
+        rc += 1; 
+    }
+    // groupName
+    tc += 1;
+    if (ek.groupName() != "Iop") {
+        std::cout << "Testcase failed (groupName)" << std::endl;
+        rc += 1; 
+    }
+    // tagName
+    tc += 1;
+    if (ek.tagName() != "InteroperabilityVersion") {
+        std::cout << "Testcase failed (tagName)" << std::endl;
+        rc += 1; 
+    }
+    // tagName
+    tc += 1;
+    if (ek.tag() != 0x0002) {
+        std::cout << "Testcase failed (tag)" << std::endl;
+        rc += 1; 
+    }
+    // ifdName
+    tc += 1;
+    if (std::string(ek.ifdName()) != "Iop") {
+        std::cout << "Testcase failed (ifdName: " << std::endl;
+        rc += 1; 
+    }
+    // sectionName
+    tc += 1;
+    if (ek.sectionName() != "Interoperability") {
+        std::cout << "Testcase failed (sectionName)" << std::endl;
+        rc += 1; 
+    }
+
+    // -----
+
+    // Copy constructor
+    ExifKey ek2(ek);
+
+    // operator<<
+    tc += 1;
+    std::ostringstream os2;
+    os2 << ek2;
+    if (os2.str() != key) {
+        std::cout << "Testcase failed (operator<<)" << std::endl;
+        rc += 1; 
+    }
+    // familyName
+    tc += 1;
+    if (std::string(ek2.familyName()) != "Exif") {
+        std::cout << "Testcase failed (familyName)" << std::endl;
+        rc += 1; 
+    }
+    // groupName
+    tc += 1;
+    if (ek2.groupName() != "Iop") {
+        std::cout << "Testcase failed (groupName)" << std::endl;
+        rc += 1; 
+    }
+    // tagName
+    tc += 1;
+    if (ek2.tagName() != "InteroperabilityVersion") {
+        std::cout << "Testcase failed (tagName)" << std::endl;
+        rc += 1; 
+    }
+    // tagName
+    tc += 1;
+    if (ek2.tag() != 0x0002) {
+        std::cout << "Testcase failed (tag)" << std::endl;
+        rc += 1; 
+    }
+    // ifdName
+    tc += 1;
+    if (std::string(ek2.ifdName()) != "Iop") {
+        std::cout << "Testcase failed (ifdName: " << std::endl;
+        rc += 1; 
+    }
+    // sectionName
+    tc += 1;
+    if (ek2.sectionName() != "Interoperability") {
+        std::cout << "Testcase failed (sectionName)" << std::endl;
+        rc += 1; 
+    }
+
+    // -----
+
+    long len = 76;
+    byte buf[] 
+        = { // No
+            0x00,0x04, 
+            // Tag       Type          Components          Offset/Data
+            0x00,0x01, 0x00,0x02, 0x00,0x00,0x00,0x04, 'T', 'h', 'e', '

-- 
exiv2 packaging



More information about the pkg-kde-commits mailing list