[sapwood] add source files for useful test code



commit 76b0934c81d037a91d0f7572205e05f28edb65ac
Author: Sven Herzberg <herzi gnome-de org>
Date:   Thu Aug 5 14:06:05 2010 +0200

    add source files for useful test code
    
    * tests/Makefile.am,
    * tests/test-framework.c,
    * tests/test-framework.h: add source files where useful test code can be
      added without replicating it in each and every source file

 tests/Makefile.am      |    6 +++++-
 tests/test-framework.c |   24 ++++++++++++++++++++++++
 tests/test-framework.h |   27 +++++++++++++++++++++++++++
 3 files changed, 56 insertions(+), 1 deletions(-)
---
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 7954caa..09d096c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -24,9 +24,13 @@ large_window_CPPFLAGS=$(AM_CPPFLAGS) -I$(top_srcdir)/engine -DTOP_SRCDIR=\""$(to
 large_window_LDADD=$(LDADD)
 
 TEST_PROGS+=test-sapwood
-test_sapwood_SOURCES=test-sapwood.c
 test_sapwood_CPPFLAGS=$(AM_CPPFLAGS) -I$(top_srcdir)/engine -DTOP_SRCDIR=\""$(top_srcdir)"\"
 test_sapwood_LDADD=$(LDADD) ../engine/libsapwood-private.la
+test_sapwood_SOURCES=\
+	test-framework.c \
+	test-framework.h \
+	test-sapwood.c \
+	$(NULL)
 
 EXTRA_DIST+=\
 	sapwood-wrapper \
diff --git a/tests/test-framework.c b/tests/test-framework.c
new file mode 100644
index 0000000..6f66903
--- /dev/null
+++ b/tests/test-framework.c
@@ -0,0 +1,24 @@
+/* This file is part of sapwood
+ *
+ * Copyright (C) 2010  Sven Herzberg
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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
+ */
+
+#include "test-framework.h"
+
+
+/* vim:set et sw=2 cino=t0,f0,(0,{s,>2s,n-1s,^-1s,e2s: */
diff --git a/tests/test-framework.h b/tests/test-framework.h
new file mode 100644
index 0000000..83c940f
--- /dev/null
+++ b/tests/test-framework.h
@@ -0,0 +1,27 @@
+/* This file is part of sapwood
+ *
+ * Copyright (C) 2010  Sven Herzberg
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 TEST_FRAMEWORK_H
+#define TEST_FRAMEWORK_H
+
+
+#endif /* !TEST_FRAMEWORK_H */
+
+/* vim:set et sw=2 cino=t0,f0,(0,{s,>2s,n-1s,^-1s,e2s: */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]