mediastreamer2_tester.h 2.36 KB
Newer Older
Ghislain MARY's avatar
Ghislain MARY committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
/*
mediastreamer2 library - modular sound and video processing and streaming
Copyright (C) 2006-2013 Belledonne Communications, Grenoble

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.
*/

#ifndef _MEDIASTREAMER2_TESTER_H
#define _MEDIASTREAMER2_TESTER_H


24 25 26 27 28 29 30 31 32 33 34 35 36 37
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) || defined(__WIN32__)
#ifdef MEDIASTREAMER2_TESTER_EXPORTS
#define MEDIASTREAMER2_TESTER_EXPORT __declspec(dllexport)
#define MEDIASTREAMER2_TESTER_VAR_EXPORT __declspec(dllexport)
#else
#define MEDIASTREAMER2_TESTER_EXPORT
#define MEDIASTREAMER2_TESTER_VAR_EXPORT extern __declspec(dllimport)
#endif
#else
#define MEDIASTREAMER2_TESTER_EXPORT extern
#define MEDIASTREAMER2_TESTER_VAR_EXPORT extern
#endif


Ghislain MARY's avatar
Ghislain MARY committed
38 39 40 41 42 43 44 45 46 47
typedef void (*test_function_t)(void);
typedef int (*test_suite_function_t)(const char *name);

typedef struct {
	const char *name;
	test_function_t func;
} test_t;

typedef struct {
	const char *name;
48
	int nb_tests;
Ghislain MARY's avatar
Ghislain MARY committed
49 50 51 52
	test_t *tests;
} test_suite_t;


53 54 55 56 57 58 59 60 61 62 63 64 65 66
#ifdef __cplusplus
extern "C" {
#endif

MEDIASTREAMER2_TESTER_VAR_EXPORT test_suite_t dtmfgen_test_suite;


MEDIASTREAMER2_TESTER_EXPORT int mediastreamer2_tester_nb_test_suites(void);
MEDIASTREAMER2_TESTER_EXPORT int mediastreamer2_tester_nb_tests(const char *suite_name);
MEDIASTREAMER2_TESTER_EXPORT const char * mediastreamer2_tester_test_suite_name(int suite_index);
MEDIASTREAMER2_TESTER_EXPORT const char * mediastreamer2_tester_test_name(const char *suite_name, int test_index);
MEDIASTREAMER2_TESTER_EXPORT void mediastreamer2_tester_init(void);
MEDIASTREAMER2_TESTER_EXPORT void mediastreamer2_tester_uninit(void);
MEDIASTREAMER2_TESTER_EXPORT int mediastreamer2_tester_run_tests(const char *suite_name, const char *test_name);
Ghislain MARY's avatar
Ghislain MARY committed
67 68


69 70 71
#ifdef __cplusplus
};
#endif
Ghislain MARY's avatar
Ghislain MARY committed
72 73 74


#endif /* _MEDIASTREAMER2_TESTER_H */