]> git.draconx.ca Git - gob-dx.git/blobdiff - testsuite.at
Pull in dxcommon for library tests.
[gob-dx.git] / testsuite.at
diff --git a/testsuite.at b/testsuite.at
new file mode 100644 (file)
index 0000000..97c0253
--- /dev/null
@@ -0,0 +1,24 @@
+AT_COPYRIGHT([Copyright © 2019 Nick Bowler
+License GPLv2+: GNU General Public License version 2 or any later version.
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.])
+
+dnl Compile a C source file with default cflags for libgobject.  The test
+dnl group is skipped if libgobject was not enabled at configure time.  The
+dnl first argument contains extra compiler flags, which must include the
+dnl source file name.  The remaining arguments correspond to the remaining
+dnl arguments of AT_CHECK (e.g., the 2nd argument to TEST_COMPILE_GOBJECT
+dnl is the 2nd argument of AT_CHECK -- the expected exit status).
+m4_define([TEST_COMPILE_GOBJECT], [AT_CHECK([$HAVE_GOBJECT || exit 77
+$CC $CPPFLAGS $CFLAGS $LIBGOBJECT_CFLAGS -c $1], m4_shift($@))])
+
+dnl Same as TEST_COMPILE_GOBJECT, except that the C++ compiler is used.
+m4_define([TEST_COMPILEXX_GOBJECT], [AT_CHECK([$HAVE_GOBJECT || exit 77
+$CXX $CPPFLAGS $CXXFLAGS $LIBGOBJECT_CFLAGS -c $1], m4_shift($@))])
+
+AT_INIT
+AT_COLOR_TESTS
+
+AT_TESTED([gob2])
+
+m4_include([tests/general.at])