Add file tests/ogg_test.c, hook into build.

This commit is contained in:
Erik de Castro Lopo 2007-08-10 21:37:39 +10:00
parent a065003d5f
commit 6e46221b5f
3 changed files with 55 additions and 5 deletions

View File

@ -7,6 +7,7 @@
*.la *.la
*.lo *.lo
*.loT *.loT
*.oga
*.paf *.paf
*.sd2 *.sd2
*.sds *.sds
@ -46,6 +47,7 @@ sndfile.pc
src/*sndfile.def src/*sndfile.def
src/FLAC/src/test_grabbag/cuesheet/test_cuesheet src/FLAC/src/test_grabbag/cuesheet/test_cuesheet
src/FLAC/src/test_grabbag/picture/test_picture 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_libFLAC/test_libFLAC
src/FLAC/src/test_seeking/test_seeking src/FLAC/src/test_seeking/test_seeking
src/FLAC/src/test_streams/test_streams src/FLAC/src/test_streams/test_streams
@ -82,4 +84,3 @@ tests/sfversion
tests/utils.c tests/utils.c
tests/utils.h tests/utils.h
tests/write_read_test.c tests/write_read_test.c
src/FLAC/src/test_libFLAC/matrix

View File

@ -1,7 +1,7 @@
## Process this file with automake to produce Makefile.in ## Process this file with automake to produce Makefile.in
if ENABLE_TEST_COVERAGE if ENABLE_TEST_COVERAGE
CPP_TEST = CPP_TEST =
else else
CPP_TEST = cpp_test CPP_TEST = cpp_test
endif 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 \ pcm_test headerless_test pipe_test benchmark header_test misc_test \
raw_test string_test open_fail_test multi_file_test dither_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 \ 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 SNDFILEDIR = ../src
INCLUDES = -I$(srcdir)/$(SNDFILEDIR) 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_SOURCES = virtual_io_test.c utils.c
virtual_io_test_LDADD = $(SNDFILEDIR)/libsndfile.la 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_SOURCES = win32_test.c
win32_test_LDADD = win32_test_LDADD =
win32_ordinal_test_SOURCES = win32_ordinal_test.c utils.c 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_SOURCES = cpp_test.cc utils.c
cpp_test_LDADD = $(SNDFILEDIR)/libsndfile.la cpp_test_LDADD = $(SNDFILEDIR)/libsndfile.la
# Lite remove start # Lite remove start
dwvw_test_SOURCES = utils.c dwvw_test.c dwvw_test_SOURCES = utils.c dwvw_test.c

46
tests/ogg_test.c Normal file
View File

@ -0,0 +1,46 @@
/*
** Copyright (C) 2007 Erik de Castro Lopo <erikd@mega-nerd.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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "sfconfig.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <sndfile.h>
#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 */