aboutsummaryrefslogtreecommitdiff
path: root/src/plugins/test_nsf.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/test_nsf.c')
-rw-r--r--src/plugins/test_nsf.c117
1 files changed, 117 insertions, 0 deletions
diff --git a/src/plugins/test_nsf.c b/src/plugins/test_nsf.c
new file mode 100644
index 0000000..e278051
--- /dev/null
+++ b/src/plugins/test_nsf.c
@@ -0,0 +1,117 @@
1/*
2 This file is part of libextractor.
3 (C) 2012 Vidyut Samanta and Christian Grothoff
4
5 libextractor is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
9
10 libextractor is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with libextractor; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
19*/
20/**
21 * @file plugins/test_nsf.c
22 * @brief testcase for nsf plugin
23 * @author Christian Grothoff
24 */
25#include "platform.h"
26#include "test_lib.h"
27
28
29
30/**
31 * Main function for the NSF testcase.
32 *
33 * @param argc number of arguments (ignored)
34 * @param argv arguments (ignored)
35 * @return 0 on success
36 */
37int
38main (int argc, char *argv[])
39{
40 struct SolutionData nsf_arkanoid_sol[] =
41 {
42 {
43 EXTRACTOR_METATYPE_MIMETYPE,
44 EXTRACTOR_METAFORMAT_UTF8,
45 "text/plain",
46 "audio/x-nsf",
47 strlen ("audio/x-nsf") + 1,
48 0
49 },
50 {
51 EXTRACTOR_METATYPE_FORMAT_VERSION,
52 EXTRACTOR_METAFORMAT_UTF8,
53 "text/plain",
54 "1",
55 strlen ("1") + 1,
56 0
57 },
58 {
59 EXTRACTOR_METATYPE_SONG_COUNT,
60 EXTRACTOR_METAFORMAT_UTF8,
61 "text/plain",
62 "26",
63 strlen ("26") + 1,
64 0
65 },
66 {
67 EXTRACTOR_METATYPE_STARTING_SONG,
68 EXTRACTOR_METAFORMAT_UTF8,
69 "text/plain",
70 "1",
71 strlen ("1") + 1,
72 0
73 },
74 {
75 EXTRACTOR_METATYPE_ALBUM,
76 EXTRACTOR_METAFORMAT_UTF8,
77 "text/plain",
78 "Arkanoid II - Revenge of Doh",
79 strlen ("Arkanoid II - Revenge of Doh") + 1,
80 0
81 },
82 {
83 EXTRACTOR_METATYPE_ARTIST,
84 EXTRACTOR_METAFORMAT_UTF8,
85 "text/plain",
86 "<?>",
87 strlen ("<?>") + 1,
88 0
89 },
90 {
91 EXTRACTOR_METATYPE_COPYRIGHT,
92 EXTRACTOR_METAFORMAT_UTF8,
93 "text/plain",
94 "1988 Taito",
95 strlen ("1988 Taito") + 1,
96 0
97 },
98 {
99 EXTRACTOR_METATYPE_BROADCAST_TELEVISION_SYSTEM,
100 EXTRACTOR_METAFORMAT_UTF8,
101 "text/plain",
102 "NTSC",
103 strlen ("NTSC") + 1,
104 0
105 },
106 { 0, 0, NULL, NULL, 0, -1 }
107 };
108 struct ProblemSet ps[] =
109 {
110 { "testdata/nsf_arkanoid.nsf",
111 nsf_arkanoid_sol },
112 { NULL, NULL }
113 };
114 return ET_main ("nsf", ps);
115}
116
117/* end of test_nsf.c */