shuerhaaken avatar shuerhaaken committed 2df64b3

extend tests

Comments (0)

Files changed (9)

+commit 0e4ab45792f09b64b33c974d8ec0e15bc7e67da7
+Author: Jörn Magens <shuerhaaken@googlemail.com>
+Date:   Mon Nov 4 15:50:09 2013 +0100
+
+    extend tests for BPM tag access
+
+commit e5b69ccd69bb54cf90b76f453d9a5a559a58898b
+Author: Jörn Magens <shuerhaaken@googlemail.com>
+Date:   Mon Nov 4 13:19:40 2013 +0100
+
+    add BPM tag access
+
+commit 6d7417e6a545b70cd997adc3fc0be1b319dd70db
+Author: Jörn Magens <shuerhaaken@googlemail.com>
+Date:   Sun Nov 3 23:56:37 2013 +0100
+
+    C documentation
+
+commit 757b079edcaf0dc595d038299bb09816bc033950
+Author: Jörn Magens <shuerhaaken@googlemail.com>
+Date:   Sun Nov 3 20:01:16 2013 +0100
+
+    More image api changes for C++
+
+commit 5a845d77f9824c19da9dbd0d9ee8e6cab3e2df12
+Author: Jörn Magens <shuerhaaken@googlemail.com>
+Date:   Sun Nov 3 01:51:26 2013 +0100
+
+    null check
+
+commit 778440b3d0613b1d6a72dd5f088f1d581d750c7f
+Author: Jörn Magens <shuerhaaken@googlemail.com>
+Date:   Sun Nov 3 00:39:05 2013 +0100
+
+    fix initialization issue
+
+commit 4cc8889a3fbe074348fb4b17d82ff279a09a92c5
+Author: Jörn Magens <shuerhaaken@googlemail.com>
+Date:   Sat Nov 2 14:40:14 2013 +0100
+
+    cleanups
+
+commit 6a323e20a0d89c210e80cf7573e7b9208d131f60
+Author: Jörn Magens <shuerhaaken@googlemail.com>
+Date:   Sat Nov 2 14:02:17 2013 +0100
+
+    more work on new image api
+
+commit 9bbef63ffb909735822fe1963b2b7f4861393220
+Author: Jörn Magens <shuerhaaken@googlemail.com>
+Date:   Fri Nov 1 17:07:02 2013 +0100
+
+    start new image api
+
+commit 5509a7928ee98da18b142cb63a8c37e3348144d8
+Author: Jörn Magens <shuerhaaken@googlemail.com>
+Date:   Fri Nov 1 17:04:58 2013 +0100
+
+    start new image api
+
+commit 7125741e1b27072964c6fd797e924925ea9717e2
+Author: Jörn Magens <shuerhaaken@googlemail.com>
+Date:   Fri Nov 1 11:48:16 2013 +0100
+
+    refactor
+
+commit 38804c3e62757bfda6834f8f5c1cd229ce1a7d7e
+Author: Jörn Magens <shuerhaaken@googlemail.com>
+Date:   Thu Oct 31 17:41:34 2013 +0100
+
+    remove print
+
+commit d82e888dc7f4dc80635286b842cfc464a7779001
+Author: Jörn Magens <shuerhaaken@googlemail.com>
+Date:   Thu Oct 31 17:40:30 2013 +0100
+
+    more image tests and resulting fixes
+
+commit 137deec18a287a62ecf97acc7fd4b468d632786f
+Author: Jörn Magens <shuerhaaken@googlemail.com>
+Date:   Thu Oct 31 00:20:09 2013 +0100
+
+    image extraction works
+
 commit 0d3ddfbe259f9c28cb0dfe379e19555958d84368
 Author: Jörn Magens <shuerhaaken@googlemail.com>
 Date:   Tue Oct 29 16:14:26 2013 +0100

tests/ctest_read/main.c

         return 1; //EXIT_FAILURE
     
     taginfo_info_enable_string_management(1);
+    char* title;
+    char* album;
+    char* comment;
+    char* composer;
     
     if(taginfo_info_load(info)) {
-        char* name = taginfo_info_get_title(info);
-        char* album = taginfo_info_get_album(info);
-        char* comment = taginfo_info_get_comment(info);
-        char* composer = taginfo_info_get_composer(info);
+        title         = taginfo_info_get_title(info);
+        album         = taginfo_info_get_album(info);
+        comment       = taginfo_info_get_comment(info);
+        composer      = taginfo_info_get_composer(info);
     }
     else {
         taginfo_info_free(info);
         return 1; //EXIT_FAILURE
     }
+    //printf("%s  %s  %s  %s  ", title, album, comment, composer);
+    if(strcmp(title, "FLAC title") != 0 ||
+       strcmp(album, "FLAC album") != 0 ||
+       strcmp(comment, "FLAC comment") != 0 ||
+       strcmp(composer, "FLAC composer") != 0   ) {
+        taginfo_info_free(info);
+        return 1; //EXIT_FAILURE
+    }
     taginfo_info_free_strings();
     taginfo_info_free(info);
     return 0; //EXIT_SUCCESS

tests/read_aif/main.cc

     info = Info::create(target);
     if( info ) {
         if( info->load() ) {
-            //std::cout << "info->artist: " << info->get_title() << std::endl;
-            if(info->get_title() == "Aiff Title" && info->get_artist() == "Aiff Artist") {
+            //std::cout << "info->get_comments(): " << info->get_comments() << std::endl;
+            //std::cout << "info->get_album(): " << info->get_album() << std::endl;
+            //std::cout << "info->get_composer(): " << info->get_composer() << std::endl;
+            //std::cout << "info->get_artist(): " << info->get_artist() << std::endl;
+            if(info->get_title() == "Aiff Title" && 
+               info->get_artist() == "Aiff Artist" &&
+               info->get_comments() == "Aiff Comment" &&
+               info->get_album() == "Aiff Album"
+               ) {
                 delete info;
                 if(remove(target.c_str()) != 0 )
                     return EXIT_FAILURE;

tests/read_ape/main.cc

     if( info ) {
         if( info->load() ) {
             //std::cout << "info->artist: " << info->artist << std::endl;
-            if(info->get_title() == "APE title" && info->get_artist() == "APE artist") {
+            if(info->get_title() == "APE title" &&
+               info->get_artist() == "APE artist" &&
+               info->get_album() == "APE album" &&
+               info->get_comments() == "APE comment"
+               ) {
                 delete info;
                 if(remove(target.c_str()) != 0 )
                     return EXIT_FAILURE;

tests/read_ext_header/main.cc

     info = Info::create( val );
     if( info ) {
         if( info->load() ) {
-            //std::cout << "info->title: " << info->title << std::endl;
-            if(info->get_title() == "Title v1") {
+            std::cout << "info->get_title(): " << info->get_title() << std::endl;
+            std::cout << "info->get_artist(): " << info->get_artist() << std::endl;
+            std::cout << "info->get_album(): " << info->get_album() << std::endl;
+            std::cout << "info->get_comments(): " << info->get_comments() << std::endl;
+            if(info->get_title() == "Title v1" &&
+               info->get_artist() == "Interpret v1" &&
+               info->get_album() == "Album v1" &&
+               info->get_comments() == "Comment v1"
+               ) {
                 delete info;
                 return EXIT_SUCCESS;
             }

tests/read_m4a/main.cc

     if(info) {
         if( info->load() ) {
             //std::cout << "info->title: " << info->title << std::endl;
-            if(info->get_title() == "M4A title") {
+            if(info->get_title() == "M4A title" &&
+               info->get_artist() == "M4A artist" &&
+               info->get_album() == "M4A album" &&
+               info->get_comments() == "M4A comment"
+            ) {
                 delete info;
                 return EXIT_SUCCESS;
             }

tests/read_mp3_v1/main.cc

     info = Info::create( val );
     if( info ) {
         if( info->load() ) {
-            if(info->get_title() == "MP3 title") {
+            if(info->get_title() == "MP3 title" &&
+               info->get_artist() == "MP3 artist" &&
+               info->get_album() == "MP3 album" &&
+               info->get_comments() == "MP3 comment"
+            ) {
                 delete info;
                 return EXIT_SUCCESS;
             }

tests/read_mp3_v2/main.cc

             //std::cout << "info->get_title: " << info->get_title() << std::endl;
             //std::cout << "info->artist: " << info->artist << std::endl;
             //std::cout << "info->album: " << info->album << std::endl;
-            if(info->get_title() == "MP3 title") {
+            if(info->get_title() == "MP3 title" &&
+               info->get_artist() == "MP3 artist" &&
+               info->get_album() == "MP3 album" &&
+               info->get_comments() == "MP3 comment"
+            ) {
                 delete info;
                 return EXIT_SUCCESS;
             }

tests/read_wma/main.cc

     if( info ) {
         if( info->load() ) {
             //std::cout << "info->title: " << info->title << std::endl;
-            if(info->get_title() == "WMA title") {
+            if(info->get_title() == "WMA title" &&
+               info->get_artist() == "WMA artist" &&
+               info->get_album() == "WMA album" &&
+               info->get_comments() == "WMA comment" ) {
                 delete info;
                 return EXIT_SUCCESS;
             }
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.