[easytag] Add a trivial ET_File_Info test



commit fc4526c271bc0a3634b235850f10f17f520a6651
Author: David King <amigadave amigadave com>
Date:   Fri Feb 13 23:01:41 2015 +0000

    Add a trivial ET_File_Info test

 Makefile.am            |   16 ++++++++++++++++
 tests/test-file_info.c |   41 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 57 insertions(+), 0 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 4d36340..f273db8 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -435,6 +435,7 @@ test-report perf-report full-report: $(check_PROGRAMS)
 check_PROGRAMS = \
        tests/test-dlm \
        tests/test-file_description \
+       tests/test-file_info \
        tests/test-misc \
        tests/test-picture \
        tests/test-scan
@@ -469,6 +470,21 @@ tests_test_file_description_SOURCES = \
 tests_test_file_description_LDADD = \
        $(EASYTAG_LIBS)
 
+tests_test_file_info_CPPFLAGS = \
+       -I$(top_srcdir)/src \
+       -I$(top_builddir)
+
+tests_test_file_info_CFLAGS = \
+       $(WARN_CFLAGS) \
+       $(EASYTAG_CFLAGS)
+
+tests_test_file_info_SOURCES = \
+       tests/test-file_info.c \
+       src/file_info.c
+
+tests_test_file_info_LDADD = \
+       $(EASYTAG_LIBS)
+
 tests_test_misc_CPPFLAGS = \
        -I$(top_srcdir)/src \
        -I$(top_srcdir)/src/tags \
diff --git a/tests/test-file_info.c b/tests/test-file_info.c
new file mode 100644
index 0000000..ddb6160
--- /dev/null
+++ b/tests/test-file_info.c
@@ -0,0 +1,41 @@
+/* EasyTAG - tag editor for audio files
+ * Copyright (C) 2015 David King <amigadave amigadave com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by the Free
+ * Software Foundation; either version 2 of the License, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ * You should have received a copy of the GNU General Public License along with
+ * this program; if not, write to the Free Software Foundation, Inc., 51
+ * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+#include "file_info.h"
+
+static void
+file_info_new (void)
+{
+    ET_File_Info *file_info;
+
+    file_info = et_file_info_new ();
+
+    g_assert (file_info);
+
+    et_file_info_free (file_info);
+}
+
+int
+main (int argc, char** argv)
+{
+    g_test_init (&argc, &argv, NULL);
+
+    g_test_add_func ("/file_info/new", file_info_new);
+
+    return g_test_run ();
+}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]