PACKAGE=	tests

TESTSDIR=	${TESTSBASE}/lib/liblutok

.PATH: ${SRCTOP}/contrib/lutok

ATF_TESTS_CXX+=	c_gate_test
ATF_TESTS_CXX+= debug_test
ATF_TESTS_CXX+= exceptions_test
ATF_TESTS_CXX+= operations_test
ATF_TESTS_CXX+= stack_cleaner_test
ATF_TESTS_CXX+= state_test
ATF_TESTS_CXX+= state_unwinding_test

.for p in ${ATF_TESTS_CXX}
SRCS.${p}=	${p}.cpp
.endfor

CXXSTD=		gnu++20

CXXFLAGS+=	-I${SRCTOP}/contrib/lutok \
		-I${SRCTOP}/contrib/lua/src \
		-I${SRCTOP}/lib/liblua	\

LIBADD+=	lua lutok

# These aren't installed because liblutok isn't distributed outside of the
# source tree and the examples tests require the library and headers to
# compile/link the tests.
#
# ATF_TESTS_SH+=	examples_test
# FILES+=		bindings.cpp
# FILES+=		hello.cpp
# FILES+=		interpreter.cpp
# FILES+=		raii.cpp
# FILESDIR=	${TESTSDIR}/examples

.include <bsd.test.mk>
