[tests] Main test program and Makefile
This commit is contained in:
16
test/Makefile.am
Normal file
16
test/Makefile.am
Normal file
@@ -0,0 +1,16 @@
|
||||
CFLAGS_BASE = -Wfloat-equal -Wpointer-arith
|
||||
CFLAGS_O0 = $(CFLAGS_BASE) -O0
|
||||
CFLAGS_O1 = $(CFLAGS_BASE) -O1
|
||||
CFLAGS_O2 = $(CFLAGS_BASE) -O2
|
||||
CFLAGS_O3 = $(CFLAGS_BASE) -O3
|
||||
DEFAULT_INCLUDES = -I.. -I$(top_builddir)/src
|
||||
|
||||
CFLAGS = $(CFLAGS_BASE)
|
||||
|
||||
SRC = $(top_builddir)/src
|
||||
|
||||
TESTS = test_libpostal
|
||||
noinst_PROGRAMS = test_libpostal
|
||||
test_libpostal_SOURCES = test.c test_expand.c test_transliterate.c test_numex.c
|
||||
test_libpostal_LDADD = $(SRC)/libpostal.la
|
||||
test_libpostal_CFLAGS = $(CFLAGS_O3)
|
||||
17
test/test.c
Normal file
17
test/test.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include "greatest.h"
|
||||
|
||||
SUITE_EXTERN(libpostal_expansion_tests);
|
||||
SUITE_EXTERN(libpostal_transliteration_tests);
|
||||
SUITE_EXTERN(libpostal_numex_tests);
|
||||
|
||||
GREATEST_MAIN_DEFS();
|
||||
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
GREATEST_MAIN_BEGIN();
|
||||
|
||||
RUN_SUITE(libpostal_expansion_tests);
|
||||
RUN_SUITE(libpostal_transliteration_tests);
|
||||
RUN_SUITE(libpostal_numex_tests);
|
||||
GREATEST_MAIN_END();
|
||||
}
|
||||
Reference in New Issue
Block a user