Code

The new CxxTest unit tests now also work on Linux! (Note that test-all
authorjaspervdg <jaspervdg@users.sourceforge.net>
Thu, 17 Jul 2008 11:33:38 +0000 (11:33 +0000)
committerjaspervdg <jaspervdg@users.sourceforge.net>
Thu, 17 Jul 2008 11:33:38 +0000 (11:33 +0000)
has become test-src and no longer includes ALL tests, just the tests in
src/.)

src/Makefile.am
src/Makefile_insert
src/display/Makefile_insert
src/helper/Makefile_insert
src/libnr/Makefile_insert
src/libnr/nr-compose-test.h
src/svg/Makefile_insert
src/util/Makefile_insert

index 36cf5169656bad853e76d0a80b031c1cdc632786..09e52576bf58f350c1ca2c7c83c0a88b9e156108 100644 (file)
@@ -117,9 +117,12 @@ noinst_LIBRARIES = \
        libinkpost.a
 
 check_LIBRARIES =      \
+       display/libtest-display.a       \
+       helper/libtest-helper.a \
        libnr/libtest-nr.a      \
        svg/libtest-svg.a       \
        svg/libtest-stubs.a     \
+       util/libtest-util.a     \
        xml/libtest-xml.a
 
 DISTCLEANFILES =       \
@@ -191,10 +194,12 @@ EXTRA_PROGRAMS =  \
        libnr/testnr
 
 TESTS =        \
-       test-all$(EXEEXT)       \
+       test-src$(EXEEXT)       \
        style-test$(EXEEXT)     \
        display/bezier-utils-test$(EXEEXT)      \
+       display/test-display$(EXEEXT)   \
        helper/units-test$(EXEEXT)      \
+       helper/test-helper$(EXEEXT)     \
        libnr/in-svg-plane-test$(EXEEXT)        \
        libnr/nr-matrix-test$(EXEEXT)   \
        libnr/nr-point-fns-test$(EXEEXT)        \
@@ -206,14 +211,15 @@ TESTS =   \
        libnr/test-nr$(EXEEXT)  \
        svg/test-svg$(EXEEXT)   \
        util/list-container-test$(EXEEXT)       \
+       util/test-util$(EXEEXT) \
        xml/test-xml$(EXEEXT)   \
        xml/quote-test$(EXEEXT) \
        xml/repr-action-test$(EXEEXT)
 
 # As of 2007-01-13, these are failing...
-XFAIL_TESTS = \
-       test-all$(EXEEXT)       \
-       style-test$(EXEEXT)
+#XFAIL_TESTS = \
+#      test-src$(EXEEXT)       \
+#      style-test$(EXEEXT)
 
 # streamtest is unfinished and can't handle the relocations done during
 # "make distcheck".  Not needed for the 0.41 release.
@@ -223,10 +229,12 @@ XFAIL_TESTS = \
 # TESTS items can be scripts etc.
 
 check_PROGRAMS =       \
-       test-all        \
+       test-src        \
        style-test      \
        display/bezier-utils-test       \
+       display/test-display    \
        helper/units-test       \
+       helper/test-helper      \
        libnr/in-svg-plane-test \
        libnr/nr-matrix-test    \
        libnr/nr-point-fns-test \
@@ -238,6 +246,7 @@ check_PROGRAMS =    \
        libnr/test-nr   \
        svg/test-svg    \
        util/list-container-test        \
+       util/test-util  \
        xml/test-xml    \
        xml/quote-test  \
        xml/repr-action-test
@@ -245,29 +254,17 @@ check_PROGRAMS =  \
 #      io/streamtest
 
 
-test-all.cpp: \
-               $(libnr_test_nr_a_SOURCES)      \
-               $(svg_test_svg_a_SOURCES)       \
-               $(xml_test_xml_a_SOURCES)       \
-               $(libnr_test_nr_includes)       \
-               $(svg_test_svg_includes)        \
-               $(xml_test_xml_includes)        \
-               $(test_all_includes)
-               $(top_srcdir)/cxxtest/cxxtestgen.pl --template=$(srcdir)/selfname.tpl -root -o test-all.cpp     \
-               $(libnr_test_nr_includes)       \
-               $(svg_test_svg_includes)        \
-               $(xml_test_xml_includes)        \
-               $(test_all_includes)
+test-src.cpp: \
+               $(test_src_includes)
+               $(top_srcdir)/cxxtest/cxxtestgen.pl --template=$(srcdir)/selfname.tpl -root -o test-src.cpp     \
+               $(test_src_includes)
 
-test_all_SOURCES = \
-       test-all.cpp $(test_all_includes)
+test_src_SOURCES = \
+       test-src.cpp $(test_src_includes)
 
 
-test_all_LDADD =       \
+test_src_LDADD =       \
        $(all_libs)     \
-       $(svg_test_svg_LDADD)   \
-       $(libnr_test_nr_LDADD)  \
-       $(xml_test_xml_LDADD) \
        io/libio.a      
 
 
@@ -282,4 +279,4 @@ dist-hook:
        cp $(srcdir)/pixmaps/*xpm $(distdir)/pixmaps
 
 distclean-local:
-       rm -f libnr/test-nr.xml libnr/test-nr.log svg/test-svg.xml svg/test-svg.log xml/test-xml.xml xml/test-xml.log test-all.xml test-all.log
+       rm -f display/test-display.xml display/test-display.log helper/test-helper.xml helper/test-helper.log libnr/test-nr.xml libnr/test-nr.log svg/test-svg.xml svg/test-svg.log util/test-util.xml util/test-util.log xml/test-xml.xml xml/test-xml.log test-src.xml test-src.log
index f60e482e6fe0c9a9efedb9dfa3e95038fb032a32..935abf456ecaa2bb7c497bb48df656a103d80b9c 100644 (file)
@@ -433,12 +433,12 @@ style_test_LDADD = $(all_libs)
 inkscape_version.h: ../configure.ac
        echo '#define INKSCAPE_VERSION "$(VERSION)"' > inkscape_version.h
 
-test_all_includes = \
-               $(srcdir)/attributes-test.h     \
-               $(srcdir)/color-profile-test.h  \
+test_src_includes = \
                $(srcdir)/MultiPrinter.h  \
                $(srcdir)/TRPIFormatter.h \
                $(srcdir)/PylogFormatter.h \
+               $(srcdir)/attributes-test.h     \
+               $(srcdir)/color-profile-test.h  \
                $(srcdir)/dir-util-test.h       \
                $(srcdir)/extract-uri-test.h    \
                $(srcdir)/mod360-test.h \
index 5c7fd892eb7149a6660fe75ba77f3828c919a836..bc74c6f227ec4a894d26300c62ddd604c525f076 100644 (file)
@@ -130,3 +130,27 @@ display_libspdisplay_a_SOURCES = \
 
 display_bezier_utils_test_SOURCES = display/bezier-utils-test.cpp
 display_bezier_utils_test_LDADD = libnr/libnr.a -lglib-2.0
+
+# Copy/paste from libnr
+display/test-display-main.cpp: display/test-display.cpp
+       $(top_srcdir)/cxxtest/cxxtestgen.pl --template=$(srcdir)/selfname.tpl -root -o display/test-display-main.cpp $(display_test_display_includes)
+
+display/test-display.cpp: $(display_test_display_includes)
+       $(top_srcdir)/cxxtest/cxxtestgen.pl -part -o display/test-display.cpp $(display_test_display_includes)
+
+display_test_display_includes = \
+       $(srcdir)/display/bezier-utils-test.h
+
+display_libtest_display_a_SOURCES = \
+       display/test-display.cpp \
+       $(display_test_display_includes)
+
+display_test_display_SOURCES = \
+       display/test-display-main.cpp \
+       $(display_test_display_includes)
+
+display_test_display_LDADD = \
+       libnr/libnr.a \
+       display/libtest-display.a \
+       -lglib-2.0
+
index 20c7e6c532fcdc8fd1e95812d5590c5be8b13980..26b2f46b2054494feaea30006b77cfd077fea5f7 100644 (file)
@@ -55,3 +55,27 @@ helper/sp-marshal.cpp helper/sp-marshal.h: Makefile
 
 helper_units_test_SOURCES = helper/units-test.cpp
 helper_units_test_LDADD = helper/libspchelp.a -lglib-2.0
+
+# Copy/paste from libnr
+helper/test-helper-main.cpp: helper/test-helper.cpp
+       $(top_srcdir)/cxxtest/cxxtestgen.pl --template=$(srcdir)/selfname.tpl -root -o helper/test-helper-main.cpp $(helper_test_helper_includes)
+
+helper/test-helper.cpp: $(helper_test_helper_includes)
+       $(top_srcdir)/cxxtest/cxxtestgen.pl -part -o helper/test-helper.cpp $(helper_test_helper_includes)
+
+helper_test_helper_includes = \
+       $(srcdir)/helper/units-test.h
+
+helper_libtest_helper_a_SOURCES = \
+       helper/test-helper.cpp \
+       $(helper_test_helper_includes)
+
+helper_test_helper_SOURCES = \
+       helper/test-helper-main.cpp \
+       $(helper_test_helper_includes)
+
+helper_test_helper_LDADD = \
+       helper/libspchelp.a \
+       helper/libtest-helper.a \
+       -lglib-2.0
+
index f2fd269bc44a8ad623b436a3920ba802d09f71f9..1ddc7d880949ae90e9dd021ba399e1fb7145fc04 100644 (file)
@@ -113,6 +113,7 @@ libnr/test-nr.cpp: $(libnr_test_nr_includes)
        $(top_srcdir)/cxxtest/cxxtestgen.pl -part -o libnr/test-nr.cpp $(libnr_test_nr_includes)
 
 libnr_test_nr_includes = \
+       $(srcdir)/libnr/nr-compose-test.h       \
        $(srcdir)/libnr/nr-types-test.h \
        $(srcdir)/libnr/nr-translate-test.h     \
        $(srcdir)/libnr/nr-rotate-test.h        \
@@ -124,6 +125,8 @@ libnr_test_nr_includes = \
 
 libnr_libtest_nr_a_SOURCES =   \
        libnr/test-nr.cpp \
+       libnr/nr-compose-reference.cpp \
+       libnr/nr-compose-reference.h \
        $(libnr_test_nr_includes)
 
 libnr_test_nr_SOURCES =        \
index 5b0d129c7c1c74d4be36ef772d41ca9feb2b1961..fbac745ef98b9192db61389947389a714ae321a1 100644 (file)
@@ -5,6 +5,7 @@
 #include "nr-compose-reference.h"
 #include <glib.h>
 #include <memory.h>
+#include <stdio.h>
 #include <stdlib.h>
 
 static inline unsigned int DIV_ROUND(unsigned int v, unsigned int divisor) { return (v+divisor/2)/divisor; }
index f8158f31b82b19fded03b70bc55722a2d1599278..48d945301edd27abd469bbdde06e116c276d6808 100644 (file)
@@ -47,7 +47,9 @@ svg/test-svg.cpp: $(svg_test_svg_includes) svg/Makefile_insert
 svg_test_svg_includes = \
        $(srcdir)/svg/css-ostringstream-test.h  \
        $(srcdir)/svg/stringstream-test.h       \
+       $(srcdir)/svg/svg-affine-test.h \
        $(srcdir)/svg/svg-color-test.h \
+       $(srcdir)/svg/svg-length-test.h \
        $(srcdir)/svg/svg-path-test.h
 
 svg_libtest_svg_a_SOURCES = \
@@ -66,4 +68,5 @@ svg_test_svg_LDADD = \
        svg/libtest-svg.a       \
        svg/libtest-stubs.a     \
        2geom/lib2geom.a        \
+       libnr/libnr.a \
        $(INKSCAPE_LIBS)
index 913dda26b57c138d86cb39bdb08a7d4375d67c35..23ed42ac817e97078ee456c9e156597015a199ef 100644 (file)
@@ -27,3 +27,25 @@ util_libinkutil_a_SOURCES = \
 util_list_container_test_SOURCES = util/list-container-test.cpp
 util_list_container_test_LDADD = gc.o $(INKSCAPE_LIBS)
 
+# Copy/paste from libnr
+util/test-util-main.cpp: util/test-util.cpp
+       $(top_srcdir)/cxxtest/cxxtestgen.pl --template=$(srcdir)/selfname.tpl -root -o util/test-util-main.cpp $(util_test_util_includes)
+
+util/test-util.cpp: $(util_test_util_includes)
+       $(top_srcdir)/cxxtest/cxxtestgen.pl -part -o util/test-util.cpp $(util_test_util_includes)
+
+util_test_util_includes = \
+       $(srcdir)/util/list-container-test.h
+
+util_libtest_util_a_SOURCES = \
+       util/test-util.cpp \
+       $(util_test_util_includes)
+
+util_test_util_SOURCES = \
+       util/test-util-main.cpp \
+       $(util_test_util_includes)
+
+util_test_util_LDADD = \
+       util/libtest-util.a \
+       gc.o $(INKSCAPE_LIBS)
+