Commit 810a16c9 authored by Hiroshi Sumita's avatar Hiroshi Sumita
Browse files

Re-enables test.

BUG=None
TEST=Build and run a test.

Review URL: https://codereview.appspot.com/6355058
parent 37b78c95
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -181,6 +181,15 @@ AC_ARG_ENABLE(db-open-phrase,
)
AM_CONDITIONAL(PYZY_BUILD_DB_OPEN_PHRASE, [test x"$enable_db_open_phrase" = x"yes" ])

# --enable-tests option.
AC_ARG_ENABLE(tests,
    AS_HELP_STRING([--enable-tests],
                   [Run tests]),
    [enable_tests=$enableval],
    [enable_tests=no]
)
AM_CONDITIONAL([ENABLE_TESTS], [test x"$enable_tests" = x"yes"])

# doxygen
AC_CHECK_PROGS([DOXYGEN], [doxygen])
if test -z "$DOXYGEN"; then
@@ -201,6 +210,7 @@ m4/Makefile
pyzy-1.0.pc
pyzy.spec
src/Makefile
src/tests/Makefile
])

AC_OUTPUT
@@ -213,5 +223,6 @@ Build options:
    Use opencc                  $enable_opencc
    Build database android      $enable_db_android
    Build database open-phrase  $enable_db_open_phrase
    Run test cases              $enable_tests
])
+7 −0
Original line number Diff line number Diff line
@@ -33,6 +33,13 @@
# 	$(NULL)
# 

if ENABLE_TESTS
SUBDIRS = \
	. \
	tests \
	$(NULL)
endif

libpyzy=libpyzy-1.0.la

libpyzyincludedir = $(includedir)/pyzy-@PYZY_API_VERSION@/PyZy

src/tests/.gitignore

0 → 100644
+2 −0
Original line number Diff line number Diff line
*.o
basic

src/tests/Makefile.am

0 → 100644
+57 −0
Original line number Diff line number Diff line
# vim:set noet ts=4:
#
# ibus-pinyin - The Chinese PinYin engine for IBus
#
# Copyright (c) 2008-2010 Peng Huang <shawn.p.huang@gmail.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, 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., 675 Mass Ave, Cambridge, MA 02139, USA.

# @MAINTAINER_MODE_FALSE@skip_gentable=test -f $@ ||

# AM_CFLAGS = \
# 	@IBUS_CFLAGS@ \
# 	@SQLITE_CFLAGS@ \
# 	-DPKGDATADIR=\"$(pkgdatadir)\" \
# 	$(NULL)
# AM_CXXFLAGS = $(AM_CFLAGS)
# AM_LDADD = \
# 	@IBUS_LIBS@ \
# 	@SQLITE_LIBS@ \
# 	$(NULL)

DEPS = $(top_builddir)/src/libpyzy-@PYZY_API_VERSION@.la

INCLUDES =                  \
        -g                  \
        @GLIB2_CFLAGS@      \
        @SQLITE_CFLAGS@     \
        @OPENCC_CFLAGS@     \
        -I$(top_srcdir)/src \
        $(NULL)

prog_ldadd =                \
        @GLIB2_LIBS@        \
        @SQLITE_LIBS@       \
        @OPENCC_LIBS@       \
        $(top_builddir)/src/libpyzy-@PYZY_API_VERSION@.la       \
        $(NULL)

noinst_PROGRAMS = $(TESTS)
TESTS =                   \
        basic             \
        $(NULL)

basic_SOURCES = basic.cc
basic_LDADD = $(prog_ldadd)

src/tests/basic.cc

0 → 100644
+1102 −0

File added.

Preview size limit exceeded, changes collapsed.