diff options
| author | Philip Paeps <philip@FreeBSD.org> | 2026-04-27 06:59:07 +0000 |
|---|---|---|
| committer | Philip Paeps <philip@FreeBSD.org> | 2026-04-27 06:59:07 +0000 |
| commit | 1102bfff8f2caed02885b18aceb9859b0bb943ae (patch) | |
| tree | 4db02b8fbe437c42cbebc89b72bf263774c57173 /tests | |
| parent | f5b5e292795b65df1847b90ab5b23889828ee28b (diff) | |
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/Makefile.am | 24 | ||||
| -rw-r--r-- | tests/Makefile.in | 156 | ||||
| -rw-r--r-- | tests/acc_tests_cxx.cpp | 32 | ||||
| -rw-r--r-- | tests/alloc_tests_cxx.cpp | 32 | ||||
| -rw-r--r-- | tests/basic_tests.c | 26 | ||||
| -rw-r--r-- | tests/basic_tests_cxx.cpp | 32 | ||||
| -rw-r--r-- | tests/chardata_cxx.cpp | 32 | ||||
| -rw-r--r-- | tests/common_cxx.cpp | 32 | ||||
| -rw-r--r-- | tests/dummy_cxx.cpp | 32 | ||||
| -rw-r--r-- | tests/handlers_cxx.cpp | 32 | ||||
| -rw-r--r-- | tests/memcheck_cxx.cpp | 32 | ||||
| -rw-r--r-- | tests/minicheck_cxx.cpp | 32 | ||||
| -rw-r--r-- | tests/misc_tests.c | 2 | ||||
| -rw-r--r-- | tests/misc_tests_cxx.cpp | 32 | ||||
| -rw-r--r-- | tests/ns_tests_cxx.cpp | 32 | ||||
| -rw-r--r-- | tests/nsalloc_tests.c | 11 | ||||
| -rw-r--r-- | tests/nsalloc_tests_cxx.cpp | 32 | ||||
| -rw-r--r-- | tests/runtests_cxx.cpp | 36 | ||||
| -rw-r--r-- | tests/structdata_cxx.cpp | 32 |
19 files changed, 50 insertions, 621 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am index d25376be5419..eefcfe023501 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -6,7 +6,7 @@ # \___/_/\_\ .__/ \__,_|\__| # |_| XML parser # -# Copyright (c) 2017-2024 Sebastian Pipping <sebastian@pipping.org> +# Copyright (c) 2017-2026 Sebastian Pipping <sebastian@pipping.org> # Copyright (c) 2017-2022 Rhodri James <rhodri@wildebeest.org.uk> # Copyright (c) 2020 Jeffrey Walton <noloader@gmail.com> # Copyright (c) 2024 Dag-Erling Smørgrav <des@des.dev> @@ -35,8 +35,8 @@ SUBDIRS = . benchmark AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(srcdir)/../lib -DXML_TESTING -check_PROGRAMS = runtests runtests_cxx -TESTS = runtests runtests_cxx +check_PROGRAMS = runtests +TESTS = runtests # To support MinGW and Non-MinGW at the same time: LOG_DRIVER = $(srcdir)/../test-driver-wrapper.sh @@ -57,27 +57,9 @@ runtests_SOURCES = \ runtests.c \ structdata.c -runtests_cxx_SOURCES = \ - acc_tests_cxx.cpp \ - alloc_tests_cxx.cpp \ - basic_tests_cxx.cpp \ - chardata_cxx.cpp \ - common_cxx.cpp \ - dummy_cxx.cpp \ - handlers_cxx.cpp \ - memcheck_cxx.cpp \ - minicheck_cxx.cpp \ - misc_tests_cxx.cpp \ - nsalloc_tests_cxx.cpp \ - ns_tests_cxx.cpp \ - runtests_cxx.cpp \ - structdata_cxx.cpp - runtests_LDADD = ../lib/libtestpat.la -runtests_cxx_LDADD = ../lib/libtestpat.la runtests_LDFLAGS = @AM_LDFLAGS@ @LIBM@ -runtests_cxx_LDFLAGS = @AM_LDFLAGS@ @LIBM@ EXTRA_DIST = \ acc_tests.h \ diff --git a/tests/Makefile.in b/tests/Makefile.in index 9ffb46a09c75..97b22713663f 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -22,7 +22,7 @@ # \___/_/\_\ .__/ \__,_|\__| # |_| XML parser # -# Copyright (c) 2017-2024 Sebastian Pipping <sebastian@pipping.org> +# Copyright (c) 2017-2026 Sebastian Pipping <sebastian@pipping.org> # Copyright (c) 2017-2022 Rhodri James <rhodri@wildebeest.org.uk> # Copyright (c) 2020 Jeffrey Walton <noloader@gmail.com> # Copyright (c) 2024 Dag-Erling Smørgrav <des@des.dev> @@ -122,8 +122,8 @@ PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -check_PROGRAMS = runtests$(EXEEXT) runtests_cxx$(EXEEXT) -TESTS = runtests$(EXEEXT) runtests_cxx$(EXEEXT) +check_PROGRAMS = runtests$(EXEEXT) +TESTS = runtests$(EXEEXT) subdir = tests ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ @@ -162,19 +162,6 @@ am__v_lt_1 = runtests_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(runtests_LDFLAGS) $(LDFLAGS) -o $@ -am_runtests_cxx_OBJECTS = acc_tests_cxx.$(OBJEXT) \ - alloc_tests_cxx.$(OBJEXT) basic_tests_cxx.$(OBJEXT) \ - chardata_cxx.$(OBJEXT) common_cxx.$(OBJEXT) \ - dummy_cxx.$(OBJEXT) handlers_cxx.$(OBJEXT) \ - memcheck_cxx.$(OBJEXT) minicheck_cxx.$(OBJEXT) \ - misc_tests_cxx.$(OBJEXT) nsalloc_tests_cxx.$(OBJEXT) \ - ns_tests_cxx.$(OBJEXT) runtests_cxx.$(OBJEXT) \ - structdata_cxx.$(OBJEXT) -runtests_cxx_OBJECTS = $(am_runtests_cxx_OBJECTS) -runtests_cxx_DEPENDENCIES = ../lib/libtestpat.la -runtests_cxx_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(runtests_cxx_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -191,20 +178,13 @@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/conftools/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/acc_tests.Po \ - ./$(DEPDIR)/acc_tests_cxx.Po ./$(DEPDIR)/alloc_tests.Po \ - ./$(DEPDIR)/alloc_tests_cxx.Po ./$(DEPDIR)/basic_tests.Po \ - ./$(DEPDIR)/basic_tests_cxx.Po ./$(DEPDIR)/chardata.Po \ - ./$(DEPDIR)/chardata_cxx.Po ./$(DEPDIR)/common.Po \ - ./$(DEPDIR)/common_cxx.Po ./$(DEPDIR)/dummy.Po \ - ./$(DEPDIR)/dummy_cxx.Po ./$(DEPDIR)/handlers.Po \ - ./$(DEPDIR)/handlers_cxx.Po ./$(DEPDIR)/memcheck.Po \ - ./$(DEPDIR)/memcheck_cxx.Po ./$(DEPDIR)/minicheck.Po \ - ./$(DEPDIR)/minicheck_cxx.Po ./$(DEPDIR)/misc_tests.Po \ - ./$(DEPDIR)/misc_tests_cxx.Po ./$(DEPDIR)/ns_tests.Po \ - ./$(DEPDIR)/ns_tests_cxx.Po ./$(DEPDIR)/nsalloc_tests.Po \ - ./$(DEPDIR)/nsalloc_tests_cxx.Po ./$(DEPDIR)/runtests.Po \ - ./$(DEPDIR)/runtests_cxx.Po ./$(DEPDIR)/structdata.Po \ - ./$(DEPDIR)/structdata_cxx.Po + ./$(DEPDIR)/alloc_tests.Po ./$(DEPDIR)/basic_tests.Po \ + ./$(DEPDIR)/chardata.Po ./$(DEPDIR)/common.Po \ + ./$(DEPDIR)/dummy.Po ./$(DEPDIR)/handlers.Po \ + ./$(DEPDIR)/memcheck.Po ./$(DEPDIR)/minicheck.Po \ + ./$(DEPDIR)/misc_tests.Po ./$(DEPDIR)/ns_tests.Po \ + ./$(DEPDIR)/nsalloc_tests.Po ./$(DEPDIR)/runtests.Po \ + ./$(DEPDIR)/structdata.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) @@ -224,26 +204,8 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) -AM_V_CXX = $(am__v_CXX_@AM_V@) -am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) -am__v_CXX_0 = @echo " CXX " $@; -am__v_CXX_1 = -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) -am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) -am__v_CXXLD_0 = @echo " CXXLD " $@; -am__v_CXXLD_1 = -SOURCES = $(runtests_SOURCES) $(runtests_cxx_SOURCES) -DIST_SOURCES = $(runtests_SOURCES) $(runtests_cxx_SOURCES) +SOURCES = $(runtests_SOURCES) +DIST_SOURCES = $(runtests_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ @@ -695,26 +657,8 @@ runtests_SOURCES = \ runtests.c \ structdata.c -runtests_cxx_SOURCES = \ - acc_tests_cxx.cpp \ - alloc_tests_cxx.cpp \ - basic_tests_cxx.cpp \ - chardata_cxx.cpp \ - common_cxx.cpp \ - dummy_cxx.cpp \ - handlers_cxx.cpp \ - memcheck_cxx.cpp \ - minicheck_cxx.cpp \ - misc_tests_cxx.cpp \ - nsalloc_tests_cxx.cpp \ - ns_tests_cxx.cpp \ - runtests_cxx.cpp \ - structdata_cxx.cpp - runtests_LDADD = ../lib/libtestpat.la -runtests_cxx_LDADD = ../lib/libtestpat.la runtests_LDFLAGS = @AM_LDFLAGS@ @LIBM@ -runtests_cxx_LDFLAGS = @AM_LDFLAGS@ @LIBM@ EXTRA_DIST = \ acc_tests.h \ alloc_tests.h \ @@ -737,7 +681,7 @@ EXTRA_DIST = \ all: all-recursive .SUFFIXES: -.SUFFIXES: .c .cpp .lo .log .o .obj .test .test$(EXEEXT) .trs +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -776,10 +720,6 @@ runtests$(EXEEXT): $(runtests_OBJECTS) $(runtests_DEPENDENCIES) $(EXTRA_runtests @rm -f runtests$(EXEEXT) $(AM_V_CCLD)$(runtests_LINK) $(runtests_OBJECTS) $(runtests_LDADD) $(LIBS) -runtests_cxx$(EXEEXT): $(runtests_cxx_OBJECTS) $(runtests_cxx_DEPENDENCIES) $(EXTRA_runtests_cxx_DEPENDENCIES) - @rm -f runtests_cxx$(EXEEXT) - $(AM_V_CXXLD)$(runtests_cxx_LINK) $(runtests_cxx_OBJECTS) $(runtests_cxx_LDADD) $(LIBS) - mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -787,33 +727,19 @@ distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acc_tests.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acc_tests_cxx.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloc_tests.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloc_tests_cxx.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basic_tests.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basic_tests_cxx.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chardata.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/chardata_cxx.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/common_cxx.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dummy_cxx.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/handlers.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/handlers_cxx.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memcheck.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memcheck_cxx.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minicheck.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/minicheck_cxx.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc_tests.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc_tests_cxx.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ns_tests.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ns_tests_cxx.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nsalloc_tests.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nsalloc_tests_cxx.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runtests.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runtests_cxx.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/structdata.Po@am__quote@ # am--include-marker -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/structdata_cxx.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @@ -842,27 +768,6 @@ am--depfiles: $(am__depfiles_remade) @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< -.cpp.o: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< - -.cpp.obj: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cpp.lo: -@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< - mostlyclean-libtool: -rm -f *.lo @@ -1141,13 +1046,6 @@ runtests.log: runtests$(EXEEXT) --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) -runtests_cxx.log: runtests_cxx$(EXEEXT) - @p='runtests_cxx$(EXEEXT)'; \ - b='runtests_cxx'; \ - $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ - --log-file $$b.log --trs-file $$b.trs \ - $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ - "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ @@ -1268,33 +1166,19 @@ clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ distclean: distclean-recursive -rm -f ./$(DEPDIR)/acc_tests.Po - -rm -f ./$(DEPDIR)/acc_tests_cxx.Po -rm -f ./$(DEPDIR)/alloc_tests.Po - -rm -f ./$(DEPDIR)/alloc_tests_cxx.Po -rm -f ./$(DEPDIR)/basic_tests.Po - -rm -f ./$(DEPDIR)/basic_tests_cxx.Po -rm -f ./$(DEPDIR)/chardata.Po - -rm -f ./$(DEPDIR)/chardata_cxx.Po -rm -f ./$(DEPDIR)/common.Po - -rm -f ./$(DEPDIR)/common_cxx.Po -rm -f ./$(DEPDIR)/dummy.Po - -rm -f ./$(DEPDIR)/dummy_cxx.Po -rm -f ./$(DEPDIR)/handlers.Po - -rm -f ./$(DEPDIR)/handlers_cxx.Po -rm -f ./$(DEPDIR)/memcheck.Po - -rm -f ./$(DEPDIR)/memcheck_cxx.Po -rm -f ./$(DEPDIR)/minicheck.Po - -rm -f ./$(DEPDIR)/minicheck_cxx.Po -rm -f ./$(DEPDIR)/misc_tests.Po - -rm -f ./$(DEPDIR)/misc_tests_cxx.Po -rm -f ./$(DEPDIR)/ns_tests.Po - -rm -f ./$(DEPDIR)/ns_tests_cxx.Po -rm -f ./$(DEPDIR)/nsalloc_tests.Po - -rm -f ./$(DEPDIR)/nsalloc_tests_cxx.Po -rm -f ./$(DEPDIR)/runtests.Po - -rm -f ./$(DEPDIR)/runtests_cxx.Po -rm -f ./$(DEPDIR)/structdata.Po - -rm -f ./$(DEPDIR)/structdata_cxx.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags @@ -1341,33 +1225,19 @@ installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f ./$(DEPDIR)/acc_tests.Po - -rm -f ./$(DEPDIR)/acc_tests_cxx.Po -rm -f ./$(DEPDIR)/alloc_tests.Po - -rm -f ./$(DEPDIR)/alloc_tests_cxx.Po -rm -f ./$(DEPDIR)/basic_tests.Po - -rm -f ./$(DEPDIR)/basic_tests_cxx.Po -rm -f ./$(DEPDIR)/chardata.Po - -rm -f ./$(DEPDIR)/chardata_cxx.Po -rm -f ./$(DEPDIR)/common.Po - -rm -f ./$(DEPDIR)/common_cxx.Po -rm -f ./$(DEPDIR)/dummy.Po - -rm -f ./$(DEPDIR)/dummy_cxx.Po -rm -f ./$(DEPDIR)/handlers.Po - -rm -f ./$(DEPDIR)/handlers_cxx.Po -rm -f ./$(DEPDIR)/memcheck.Po - -rm -f ./$(DEPDIR)/memcheck_cxx.Po -rm -f ./$(DEPDIR)/minicheck.Po - -rm -f ./$(DEPDIR)/minicheck_cxx.Po -rm -f ./$(DEPDIR)/misc_tests.Po - -rm -f ./$(DEPDIR)/misc_tests_cxx.Po -rm -f ./$(DEPDIR)/ns_tests.Po - -rm -f ./$(DEPDIR)/ns_tests_cxx.Po -rm -f ./$(DEPDIR)/nsalloc_tests.Po - -rm -f ./$(DEPDIR)/nsalloc_tests_cxx.Po -rm -f ./$(DEPDIR)/runtests.Po - -rm -f ./$(DEPDIR)/runtests_cxx.Po -rm -f ./$(DEPDIR)/structdata.Po - -rm -f ./$(DEPDIR)/structdata_cxx.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic diff --git a/tests/acc_tests_cxx.cpp b/tests/acc_tests_cxx.cpp deleted file mode 100644 index 01644991ae51..000000000000 --- a/tests/acc_tests_cxx.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* C++ compilation harness for the test suite. - __ __ _ - ___\ \/ /_ __ __ _| |_ - / _ \\ /| '_ \ / _` | __| - | __// \| |_) | (_| | |_ - \___/_/\_\ .__/ \__,_|\__| - |_| XML parser - - Copyright (c) 2023 Sebastian Pipping <sebastian@pipping.org> - Licensed under the MIT license: - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit - persons to whom the Software is furnished to do so, subject to the - following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include "acc_tests.c" diff --git a/tests/alloc_tests_cxx.cpp b/tests/alloc_tests_cxx.cpp deleted file mode 100644 index 3270b1a6c984..000000000000 --- a/tests/alloc_tests_cxx.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* C++ compilation harness for the test suite. - __ __ _ - ___\ \/ /_ __ __ _| |_ - / _ \\ /| '_ \ / _` | __| - | __// \| |_) | (_| | |_ - \___/_/\_\ .__/ \__,_|\__| - |_| XML parser - - Copyright (c) 2023 Sebastian Pipping <sebastian@pipping.org> - Licensed under the MIT license: - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit - persons to whom the Software is furnished to do so, subject to the - following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include "alloc_tests.c" diff --git a/tests/basic_tests.c b/tests/basic_tests.c index 02d1d5fd3c10..537c7e0e5a5c 100644 --- a/tests/basic_tests.c +++ b/tests/basic_tests.c @@ -20,6 +20,7 @@ Copyright (c) 2021 Donghee Na <donghee.na@python.org> Copyright (c) 2023-2024 Sony Corporation / Snild Dolkow <snild@sony.com> Copyright (c) 2024-2025 Berkay Eren Ürün <berkay.ueruen@siemens.com> + Copyright (c) 2026 Francesco Bertolaccini Licensed under the MIT license: Permission is hereby granted, free of charge, to any person obtaining @@ -204,6 +205,30 @@ START_TEST(test_hash_collision) { END_TEST #undef COLLIDING_HASH_SALT +START_TEST(test_hash_salt_setter) { + const uint8_t entropy[16] = {'0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}; + XML_Parser parser = XML_ParserCreate(NULL); + + // NULL parser should be rejected + assert_true(XML_SetHashSalt16Bytes(NULL, entropy) == XML_FALSE); + + // NULL entropy should be rejected + assert_true(XML_SetHashSalt16Bytes(parser, NULL) == XML_FALSE); + + // Setting should be allowed more than once + assert_true(XML_SetHashSalt16Bytes(parser, entropy) == XML_TRUE); + assert_true(XML_SetHashSalt16Bytes(parser, entropy) == XML_TRUE); + + // But not after parsing has started + assert_true(XML_Parse(parser, "", 0, XML_FALSE /* isFinal */) + == XML_STATUS_OK); + assert_true(XML_SetHashSalt16Bytes(parser, entropy) == XML_FALSE); + + XML_ParserFree(parser); +} +END_TEST + /* Regression test for SF bug #491986. */ START_TEST(test_danish_latin1) { const char *text = "<?xml version='1.0' encoding='iso-8859-1'?>\n" @@ -6292,6 +6317,7 @@ make_basic_test_case(Suite *s) { tcase_add_test(tc_basic, test_bom_utf16_le); tcase_add_test(tc_basic, test_nobom_utf16_le); tcase_add_test(tc_basic, test_hash_collision); + tcase_add_test(tc_basic, test_hash_salt_setter); tcase_add_test(tc_basic, test_illegal_utf8); tcase_add_test(tc_basic, test_utf8_auto_align); tcase_add_test(tc_basic, test_utf16); diff --git a/tests/basic_tests_cxx.cpp b/tests/basic_tests_cxx.cpp deleted file mode 100644 index d7e75a9061cf..000000000000 --- a/tests/basic_tests_cxx.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* C++ compilation harness for the test suite. - __ __ _ - ___\ \/ /_ __ __ _| |_ - / _ \\ /| '_ \ / _` | __| - | __// \| |_) | (_| | |_ - \___/_/\_\ .__/ \__,_|\__| - |_| XML parser - - Copyright (c) 2023 Sebastian Pipping <sebastian@pipping.org> - Licensed under the MIT license: - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit - persons to whom the Software is furnished to do so, subject to the - following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include "basic_tests.c" diff --git a/tests/chardata_cxx.cpp b/tests/chardata_cxx.cpp deleted file mode 100644 index 81820c72dca1..000000000000 --- a/tests/chardata_cxx.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* C++ compilation harness for the test suite. - __ __ _ - ___\ \/ /_ __ __ _| |_ - / _ \\ /| '_ \ / _` | __| - | __// \| |_) | (_| | |_ - \___/_/\_\ .__/ \__,_|\__| - |_| XML parser - - Copyright (c) 2023 Sebastian Pipping <sebastian@pipping.org> - Licensed under the MIT license: - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit - persons to whom the Software is furnished to do so, subject to the - following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include "chardata.c" diff --git a/tests/common_cxx.cpp b/tests/common_cxx.cpp deleted file mode 100644 index 698a0ccfa9d5..000000000000 --- a/tests/common_cxx.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* C++ compilation harness for the test suite. - __ __ _ - ___\ \/ /_ __ __ _| |_ - / _ \\ /| '_ \ / _` | __| - | __// \| |_) | (_| | |_ - \___/_/\_\ .__/ \__,_|\__| - |_| XML parser - - Copyright (c) 2023 Sebastian Pipping <sebastian@pipping.org> - Licensed under the MIT license: - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit - persons to whom the Software is furnished to do so, subject to the - following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include "common.c" diff --git a/tests/dummy_cxx.cpp b/tests/dummy_cxx.cpp deleted file mode 100644 index 27c9f431ecd8..000000000000 --- a/tests/dummy_cxx.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* C++ compilation harness for the test suite. - __ __ _ - ___\ \/ /_ __ __ _| |_ - / _ \\ /| '_ \ / _` | __| - | __// \| |_) | (_| | |_ - \___/_/\_\ .__/ \__,_|\__| - |_| XML parser - - Copyright (c) 2023 Sebastian Pipping <sebastian@pipping.org> - Licensed under the MIT license: - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit - persons to whom the Software is furnished to do so, subject to the - following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include "dummy.c" diff --git a/tests/handlers_cxx.cpp b/tests/handlers_cxx.cpp deleted file mode 100644 index 86c62b159cc7..000000000000 --- a/tests/handlers_cxx.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* C++ compilation harness for the test suite. - __ __ _ - ___\ \/ /_ __ __ _| |_ - / _ \\ /| '_ \ / _` | __| - | __// \| |_) | (_| | |_ - \___/_/\_\ .__/ \__,_|\__| - |_| XML parser - - Copyright (c) 2023 Sebastian Pipping <sebastian@pipping.org> - Licensed under the MIT license: - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit - persons to whom the Software is furnished to do so, subject to the - following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include "handlers.c" diff --git a/tests/memcheck_cxx.cpp b/tests/memcheck_cxx.cpp deleted file mode 100644 index e62ac98999c8..000000000000 --- a/tests/memcheck_cxx.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* C++ compilation harness for the test suite. - __ __ _ - ___\ \/ /_ __ __ _| |_ - / _ \\ /| '_ \ / _` | __| - | __// \| |_) | (_| | |_ - \___/_/\_\ .__/ \__,_|\__| - |_| XML parser - - Copyright (c) 2023 Sebastian Pipping <sebastian@pipping.org> - Licensed under the MIT license: - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit - persons to whom the Software is furnished to do so, subject to the - following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include "memcheck.c" diff --git a/tests/minicheck_cxx.cpp b/tests/minicheck_cxx.cpp deleted file mode 100644 index 58881c60ba07..000000000000 --- a/tests/minicheck_cxx.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* C++ compilation harness for the test suite. - __ __ _ - ___\ \/ /_ __ __ _| |_ - / _ \\ /| '_ \ / _` | __| - | __// \| |_) | (_| | |_ - \___/_/\_\ .__/ \__,_|\__| - |_| XML parser - - Copyright (c) 2023 Sebastian Pipping <sebastian@pipping.org> - Licensed under the MIT license: - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit - persons to whom the Software is furnished to do so, subject to the - following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include "minicheck.c" diff --git a/tests/misc_tests.c b/tests/misc_tests.c index 1c508bd10466..6d1a2f1488b0 100644 --- a/tests/misc_tests.c +++ b/tests/misc_tests.c @@ -212,7 +212,7 @@ START_TEST(test_misc_version) { if (! versions_equal(&read_version, &parsed_version)) fail("Version mismatch"); - if (xcstrcmp(version_text, XCS("expat_2.7.5")) + if (xcstrcmp(version_text, XCS("expat_2.8.0")) != 0) /* needs bump on releases */ fail("XML_*_VERSION in expat.h out of sync?\n"); } diff --git a/tests/misc_tests_cxx.cpp b/tests/misc_tests_cxx.cpp deleted file mode 100644 index 0b84c1b1f4d6..000000000000 --- a/tests/misc_tests_cxx.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* C++ compilation harness for the test suite. - __ __ _ - ___\ \/ /_ __ __ _| |_ - / _ \\ /| '_ \ / _` | __| - | __// \| |_) | (_| | |_ - \___/_/\_\ .__/ \__,_|\__| - |_| XML parser - - Copyright (c) 2023 Sebastian Pipping <sebastian@pipping.org> - Licensed under the MIT license: - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit - persons to whom the Software is furnished to do so, subject to the - following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include "misc_tests.c" diff --git a/tests/ns_tests_cxx.cpp b/tests/ns_tests_cxx.cpp deleted file mode 100644 index b2fe187bb8b4..000000000000 --- a/tests/ns_tests_cxx.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* C++ compilation harness for the test suite. - __ __ _ - ___\ \/ /_ __ __ _| |_ - / _ \\ /| '_ \ / _` | __| - | __// \| |_) | (_| | |_ - \___/_/\_\ .__/ \__,_|\__| - |_| XML parser - - Copyright (c) 2023 Sebastian Pipping <sebastian@pipping.org> - Licensed under the MIT license: - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit - persons to whom the Software is furnished to do so, subject to the - following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include "ns_tests.c" diff --git a/tests/nsalloc_tests.c b/tests/nsalloc_tests.c index 9e26d4ee1418..830bd1953b73 100644 --- a/tests/nsalloc_tests.c +++ b/tests/nsalloc_tests.c @@ -10,7 +10,7 @@ Copyright (c) 2003 Greg Stein <gstein@users.sourceforge.net> Copyright (c) 2005-2007 Steven Solie <steven@solie.ca> Copyright (c) 2005-2012 Karl Waclawek <karl@waclawek.net> - Copyright (c) 2016-2025 Sebastian Pipping <sebastian@pipping.org> + Copyright (c) 2016-2026 Sebastian Pipping <sebastian@pipping.org> Copyright (c) 2017-2022 Rhodri James <rhodri@wildebeest.org.uk> Copyright (c) 2017 Joe Orton <jorton@redhat.com> Copyright (c) 2017 José Gutiérrez de la Concha <jose@zeroc.com> @@ -18,6 +18,7 @@ Copyright (c) 2019 David Loffredo <loffredo@steptools.com> Copyright (c) 2020 Tim Gates <tim.gates@iress.com> Copyright (c) 2021 Donghee Na <donghee.na@python.org> + Copyright (c) 2026 Christian Ng <christianrng@berkeley.edu> Licensed under the MIT license: Permission is hereby granted, free of charge, to any person obtaining @@ -1507,7 +1508,7 @@ END_TEST /* Verify that retry after OOM in setContext() does not crash. */ -START_TEST(test_nsalloc_setContext_zombie) { +START_TEST(test_nsalloc_set_context_zombie) { const char *text = "<doc>Hello</doc>"; unsigned int i; const unsigned int max_alloc_count = 30; @@ -1519,7 +1520,9 @@ START_TEST(test_nsalloc_setContext_zombie) { break; /* Retry on the same parser — must not crash */ g_allocation_count = ALLOC_ALWAYS_SUCCEED; - XML_Parse(g_parser, text, (int)strlen(text), XML_TRUE); + const enum XML_Status status + = XML_Parse(g_parser, text, (int)strlen(text), XML_TRUE); + (void)status; nsalloc_teardown(); nsalloc_setup(); @@ -1565,5 +1568,5 @@ make_nsalloc_test_case(Suite *s) { tcase_add_test__if_xml_ge(tc_nsalloc, test_nsalloc_long_default_in_ext); tcase_add_test(tc_nsalloc, test_nsalloc_long_systemid_in_ext); tcase_add_test(tc_nsalloc, test_nsalloc_prefixed_element); - tcase_add_test(tc_nsalloc, test_nsalloc_setContext_zombie); + tcase_add_test(tc_nsalloc, test_nsalloc_set_context_zombie); } diff --git a/tests/nsalloc_tests_cxx.cpp b/tests/nsalloc_tests_cxx.cpp deleted file mode 100644 index 9ba75d1c5368..000000000000 --- a/tests/nsalloc_tests_cxx.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* C++ compilation harness for the test suite. - __ __ _ - ___\ \/ /_ __ __ _| |_ - / _ \\ /| '_ \ / _` | __| - | __// \| |_) | (_| | |_ - \___/_/\_\ .__/ \__,_|\__| - |_| XML parser - - Copyright (c) 2023 Sebastian Pipping <sebastian@pipping.org> - Licensed under the MIT license: - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit - persons to whom the Software is furnished to do so, subject to the - following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include "nsalloc_tests.c" diff --git a/tests/runtests_cxx.cpp b/tests/runtests_cxx.cpp deleted file mode 100644 index 396714560a06..000000000000 --- a/tests/runtests_cxx.cpp +++ /dev/null @@ -1,36 +0,0 @@ -/* C++ compilation harness for the test suite. - - This is used to ensure the Expat headers can be included from C++ - and have everything work as expected. - __ __ _ - ___\ \/ /_ __ __ _| |_ - / _ \\ /| '_ \ / _` | __| - | __// \| |_) | (_| | |_ - \___/_/\_\ .__/ \__,_|\__| - |_| XML parser - - Copyright (c) 2005 Fred L. Drake, Jr. <fdrake@users.sourceforge.net> - Copyright (c) 2017-2023 Sebastian Pipping <sebastian@pipping.org> - Licensed under the MIT license: - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit - persons to whom the Software is furnished to do so, subject to the - following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include "runtests.c" diff --git a/tests/structdata_cxx.cpp b/tests/structdata_cxx.cpp deleted file mode 100644 index 43448f634057..000000000000 --- a/tests/structdata_cxx.cpp +++ /dev/null @@ -1,32 +0,0 @@ -/* C++ compilation harness for the test suite. - __ __ _ - ___\ \/ /_ __ __ _| |_ - / _ \\ /| '_ \ / _` | __| - | __// \| |_) | (_| | |_ - \___/_/\_\ .__/ \__,_|\__| - |_| XML parser - - Copyright (c) 2023 Sebastian Pipping <sebastian@pipping.org> - Licensed under the MIT license: - - Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to permit - persons to whom the Software is furnished to do so, subject to the - following conditions: - - The above copyright notice and this permission notice shall be included - in all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN - NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, - DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR - OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE - USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#include "structdata.c" |
