xref: /aosp_15_r20/external/flac/src/test_libFLAC/main.c (revision 600f14f40d737144c998e2ec7a483122d3776fbc)
1*600f14f4SXin Li /* test_libFLAC - Unit tester for libFLAC
2*600f14f4SXin Li  * Copyright (C) 2000-2009  Josh Coalson
3*600f14f4SXin Li  * Copyright (C) 2011-2023  Xiph.Org Foundation
4*600f14f4SXin Li  *
5*600f14f4SXin Li  * This program is free software; you can redistribute it and/or
6*600f14f4SXin Li  * modify it under the terms of the GNU General Public License
7*600f14f4SXin Li  * as published by the Free Software Foundation; either version 2
8*600f14f4SXin Li  * of the License, or (at your option) any later version.
9*600f14f4SXin Li  *
10*600f14f4SXin Li  * This program is distributed in the hope that it will be useful,
11*600f14f4SXin Li  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12*600f14f4SXin Li  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13*600f14f4SXin Li  * GNU General Public License for more details.
14*600f14f4SXin Li  *
15*600f14f4SXin Li  * You should have received a copy of the GNU General Public License along
16*600f14f4SXin Li  * with this program; if not, write to the Free Software Foundation, Inc.,
17*600f14f4SXin Li  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18*600f14f4SXin Li  */
19*600f14f4SXin Li 
20*600f14f4SXin Li #ifdef HAVE_CONFIG_H
21*600f14f4SXin Li #  include <config.h>
22*600f14f4SXin Li #endif
23*600f14f4SXin Li 
24*600f14f4SXin Li #include "bitreader.h"
25*600f14f4SXin Li #include "bitwriter.h"
26*600f14f4SXin Li #include "crc.h"
27*600f14f4SXin Li #include "decoders.h"
28*600f14f4SXin Li #include "encoders.h"
29*600f14f4SXin Li #include "endswap.h"
30*600f14f4SXin Li #include "format.h"
31*600f14f4SXin Li #include "metadata.h"
32*600f14f4SXin Li #include "md5.h"
33*600f14f4SXin Li 
main(void)34*600f14f4SXin Li int main(void)
35*600f14f4SXin Li {
36*600f14f4SXin Li 	if(!test_endswap())
37*600f14f4SXin Li 		return 1;
38*600f14f4SXin Li 
39*600f14f4SXin Li 	if(!test_crc())
40*600f14f4SXin Li 		return 1;
41*600f14f4SXin Li 
42*600f14f4SXin Li 	if(!test_md5())
43*600f14f4SXin Li 		return 1;
44*600f14f4SXin Li 
45*600f14f4SXin Li 	if(!test_bitreader())
46*600f14f4SXin Li 		return 1;
47*600f14f4SXin Li 
48*600f14f4SXin Li 	if(!test_bitwriter())
49*600f14f4SXin Li 		return 1;
50*600f14f4SXin Li 
51*600f14f4SXin Li 	if(!test_format())
52*600f14f4SXin Li 		return 1;
53*600f14f4SXin Li 
54*600f14f4SXin Li 	if(!test_encoders())
55*600f14f4SXin Li 		return 1;
56*600f14f4SXin Li 
57*600f14f4SXin Li 	if(!test_decoders())
58*600f14f4SXin Li 		return 1;
59*600f14f4SXin Li 
60*600f14f4SXin Li 	if(!test_metadata())
61*600f14f4SXin Li 		return 1;
62*600f14f4SXin Li 
63*600f14f4SXin Li 	return 0;
64*600f14f4SXin Li }
65