From 6e46221b5fb490af403bb9b1f59c19fba28b2dc0 Mon Sep 17 00:00:00 2001 From: Erik de Castro Lopo Date: Fri, 10 Aug 2007 21:37:39 +1000 Subject: [PATCH] Add file tests/ogg_test.c, hook into build. --- .bzrignore | 3 ++- tests/Makefile.am | 11 +++++++---- tests/ogg_test.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+), 5 deletions(-) create mode 100644 tests/ogg_test.c diff --git a/.bzrignore b/.bzrignore index 513346a1..c950ea5e 100644 --- a/.bzrignore +++ b/.bzrignore @@ -7,6 +7,7 @@ *.la *.lo *.loT +*.oga *.paf *.sd2 *.sds @@ -46,6 +47,7 @@ sndfile.pc src/*sndfile.def src/FLAC/src/test_grabbag/cuesheet/test_cuesheet src/FLAC/src/test_grabbag/picture/test_picture +src/FLAC/src/test_libFLAC/matrix src/FLAC/src/test_libFLAC/test_libFLAC src/FLAC/src/test_seeking/test_seeking src/FLAC/src/test_streams/test_streams @@ -82,4 +84,3 @@ tests/sfversion tests/utils.c tests/utils.h tests/write_read_test.c -src/FLAC/src/test_libFLAC/matrix diff --git a/tests/Makefile.am b/tests/Makefile.am index 9bb63b63..e087b2ea 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,7 +1,7 @@ ## Process this file with automake to produce Makefile.in if ENABLE_TEST_COVERAGE -CPP_TEST = +CPP_TEST = else CPP_TEST = cpp_test endif @@ -12,7 +12,7 @@ noinst_PROGRAMS = sfversion floating_point_test write_read_test \ pcm_test headerless_test pipe_test benchmark header_test misc_test \ raw_test string_test open_fail_test multi_file_test dither_test \ scale_clip_test win32_test fix_this aiff_rw_test virtual_io_test \ - locale_test largefile_test win32_ordinal_test $(CPP_TEST) + locale_test largefile_test win32_ordinal_test ogg_test $(CPP_TEST) SNDFILEDIR = ../src INCLUDES = -I$(srcdir)/$(SNDFILEDIR) @@ -109,14 +109,17 @@ multi_file_test_LDADD = $(SNDFILEDIR)/libsndfile.la virtual_io_test_SOURCES = virtual_io_test.c utils.c virtual_io_test_LDADD = $(SNDFILEDIR)/libsndfile.la +ogg_test_SOURCES = ogg_test.c utils.c +ogg_test_LDADD = $(SNDFILEDIR)/libsndfile.la + win32_test_SOURCES = win32_test.c win32_test_LDADD = win32_ordinal_test_SOURCES = win32_ordinal_test.c utils.c -win32_ordinal_test_LDADD = $(SNDFILEDIR)/libsndfile.la +win32_ordinal_test_LDADD = $(SNDFILEDIR)/libsndfile.la cpp_test_SOURCES = cpp_test.cc utils.c -cpp_test_LDADD = $(SNDFILEDIR)/libsndfile.la +cpp_test_LDADD = $(SNDFILEDIR)/libsndfile.la # Lite remove start dwvw_test_SOURCES = utils.c dwvw_test.c diff --git a/tests/ogg_test.c b/tests/ogg_test.c new file mode 100644 index 00000000..dbea9b6a --- /dev/null +++ b/tests/ogg_test.c @@ -0,0 +1,46 @@ +/* +** Copyright (C) 2007 Erik de Castro Lopo +** +** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +*/ + +#include "sfconfig.h" + +#include +#include +#include + +#include + +#include + +#include "utils.h" +#include "generate.h" + +#define SAMPLE_RATE 44100 +#define DATA_LENGTH (2 * SAMPLE_RATE) + + +int +main (void) +{ const char * filename = "vorbis.oga" ; + + print_test_name ("ogg test",filename) ; + + puts ("ok") ; + + return 0 ; +} /* main */ +