初步修复
This commit is contained in:
parent
8fc4357cc6
commit
e4714f3f0e
46705 changed files with 12004901 additions and 0 deletions
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef CPPUNIT_PORTABILITY_CPPUNITDEQUE_H
|
||||
#define CPPUNIT_PORTABILITY_CPPUNITDEQUE_H
|
||||
|
||||
// The technic used is similar to the wrapper of STLPort.
|
||||
|
||||
#include <cppunit/Portability.h>
|
||||
#include <deque>
|
||||
|
||||
|
||||
#if CPPUNIT_STD_NEED_ALLOCATOR
|
||||
|
||||
template<class T>
|
||||
class CppUnitDeque : public std::deque<T,CPPUNIT_STD_ALLOCATOR>
|
||||
{
|
||||
public:
|
||||
};
|
||||
|
||||
#else // CPPUNIT_STD_NEED_ALLOCATOR
|
||||
|
||||
#define CppUnitDeque std::deque
|
||||
|
||||
#endif
|
||||
|
||||
#endif // CPPUNIT_PORTABILITY_CPPUNITDEQUE_H
|
||||
|
||||
|
|
@ -0,0 +1,29 @@
|
|||
#ifndef CPPUNIT_PORTABILITY_CPPUNITMAP_H
|
||||
#define CPPUNIT_PORTABILITY_CPPUNITMAP_H
|
||||
|
||||
// The technic used is similar to the wrapper of STLPort.
|
||||
|
||||
#include <cppunit/Portability.h>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
|
||||
|
||||
#if CPPUNIT_STD_NEED_ALLOCATOR
|
||||
|
||||
template<class Key, class T>
|
||||
class CppUnitMap : public std::map<Key
|
||||
,T
|
||||
,std::less<Key>
|
||||
,CPPUNIT_STD_ALLOCATOR>
|
||||
{
|
||||
public:
|
||||
};
|
||||
|
||||
#else // CPPUNIT_STD_NEED_ALLOCATOR
|
||||
|
||||
#define CppUnitMap std::map
|
||||
|
||||
#endif
|
||||
|
||||
#endif // CPPUNIT_PORTABILITY_CPPUNITMAP_H
|
||||
|
||||
|
|
@ -0,0 +1,28 @@
|
|||
#ifndef CPPUNIT_PORTABILITY_CPPUNITSET_H
|
||||
#define CPPUNIT_PORTABILITY_CPPUNITSET_H
|
||||
|
||||
// The technic used is similar to the wrapper of STLPort.
|
||||
|
||||
#include <cppunit/Portability.h>
|
||||
#include <functional>
|
||||
#include <set>
|
||||
|
||||
|
||||
#if CPPUNIT_STD_NEED_ALLOCATOR
|
||||
|
||||
template<class T>
|
||||
class CppUnitSet : public std::set<T
|
||||
,std::less<T>
|
||||
,CPPUNIT_STD_ALLOCATOR>
|
||||
{
|
||||
public:
|
||||
};
|
||||
|
||||
#else // CPPUNIT_STD_NEED_ALLOCATOR
|
||||
|
||||
#define CppUnitSet std::set
|
||||
|
||||
#endif
|
||||
|
||||
#endif // CPPUNIT_PORTABILITY_CPPUNITSET_H
|
||||
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
#ifndef CPPUNIT_PORTABILITY_CPPUNITSTACK_H
|
||||
#define CPPUNIT_PORTABILITY_CPPUNITSTACK_H
|
||||
|
||||
// The technic used is similar to the wrapper of STLPort.
|
||||
|
||||
#include <cppunit/Portability.h>
|
||||
#include <deque>
|
||||
#include <stack>
|
||||
|
||||
|
||||
#if CPPUNIT_STD_NEED_ALLOCATOR
|
||||
|
||||
template<class T>
|
||||
class CppUnitStack : public std::stack<T
|
||||
,std::deque<T,CPPUNIT_STD_ALLOCATOR> >
|
||||
{
|
||||
public:
|
||||
};
|
||||
|
||||
#else // CPPUNIT_STD_NEED_ALLOCATOR
|
||||
|
||||
#define CppUnitStack std::stack
|
||||
|
||||
#endif
|
||||
|
||||
#endif // CPPUNIT_PORTABILITY_CPPUNITSTACK_H
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef CPPUNIT_PORTABILITY_CPPUNITVECTOR_H
|
||||
#define CPPUNIT_PORTABILITY_CPPUNITVECTOR_H
|
||||
|
||||
// The technic used is similar to the wrapper of STLPort.
|
||||
|
||||
#include <cppunit/Portability.h>
|
||||
#include <vector>
|
||||
|
||||
|
||||
#if CPPUNIT_STD_NEED_ALLOCATOR
|
||||
|
||||
template<class T>
|
||||
class CppUnitVector : public std::vector<T,CPPUNIT_STD_ALLOCATOR>
|
||||
{
|
||||
public:
|
||||
};
|
||||
|
||||
#else // CPPUNIT_STD_NEED_ALLOCATOR
|
||||
|
||||
#define CppUnitVector std::vector
|
||||
|
||||
#endif
|
||||
|
||||
#endif // CPPUNIT_PORTABILITY_CPPUNITVECTOR_H
|
||||
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
#ifndef CPPUNIT_PORTABILITY_FLOATINGPOINT_H_INCLUDED
|
||||
#define CPPUNIT_PORTABILITY_FLOATINGPOINT_H_INCLUDED
|
||||
|
||||
#include <cppunit/Portability.h>
|
||||
#include <math.h>
|
||||
|
||||
CPPUNIT_NS_BEGIN
|
||||
|
||||
/// \brief Tests if a floating-point is a NaN.
|
||||
// According to IEEE-754 floating point standard,
|
||||
// (see e.g. page 8 of
|
||||
// http://www.cs.berkeley.edu/~wkahan/ieee754status/ieee754.ps)
|
||||
// all comparisons with NaN are false except "x != x", which is true.
|
||||
//
|
||||
// At least Microsoft Visual Studio 6 is known not to implement this test correctly.
|
||||
// It emits the following code to test equality:
|
||||
// fcomp qword ptr [nan]
|
||||
// fnstsw ax // copie fp (floating-point) status register to ax
|
||||
// test ah,40h // test bit 14 of ax (0x4000) => C3 of fp status register
|
||||
// According to the following documentation on the x86 floating point status register,
|
||||
// the C2 bit should be tested to test for NaN value.
|
||||
// http://webster.cs.ucr.edu/AoA/Windows/HTML/RealArithmetic.html#1000117
|
||||
// In Microsoft Visual Studio 2003 & 2005, the test is implemented with:
|
||||
// test ah,44h // Visual Studio 2005 test both C2 & C3...
|
||||
//
|
||||
// To work around this, a NaN is assumed to be detected if no strict ordering is found.
|
||||
inline bool floatingPointIsUnordered( double x )
|
||||
{
|
||||
// x != x will detect a NaN on conformant platform
|
||||
// (2.0 < x && x < 1.0) will detect a NaN on non conformant platform:
|
||||
// => no ordering can be found for x.
|
||||
return (x != x) || (2.0 < x && x < 1.0);
|
||||
}
|
||||
|
||||
|
||||
/// \brief Tests if a floating-point is finite.
|
||||
/// @return \c true if x is neither a NaN, nor +inf, nor -inf, \c false otherwise.
|
||||
inline int floatingPointIsFinite( double x )
|
||||
{
|
||||
#if defined(CPPUNIT_HAVE_ISFINITE)
|
||||
return isfinite( x );
|
||||
#elif defined(CPPUNIT_HAVE_FINITE)
|
||||
return finite( x );
|
||||
#elif defined(CPPUNIT_HAVE__FINITE)
|
||||
return _finite(x);
|
||||
#else
|
||||
double testInf = x * 0.0; // Produce 0.0 if x is finite, a NaN otherwise.
|
||||
return testInf == 0.0 && !floatingPointIsUnordered(testInf);
|
||||
#endif
|
||||
}
|
||||
|
||||
CPPUNIT_NS_END
|
||||
|
||||
#endif // CPPUNIT_PORTABILITY_FLOATINGPOINT_H_INCLUDED
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
libcppunitincludedir = $(includedir)/cppunit/portability
|
||||
|
||||
libcppunitinclude_HEADERS = \
|
||||
CppUnitDeque.h \
|
||||
CppUnitMap.h \
|
||||
CppUnitSet.h \
|
||||
CppUnitStack.h \
|
||||
CppUnitVector.h \
|
||||
FloatingPoint.h \
|
||||
Stream.h
|
||||
438
Common/cppunit-1.12.1/include/cppunit/portability/Makefile.in
Normal file
438
Common/cppunit-1.12.1/include/cppunit/portability/Makefile.in
Normal file
|
|
@ -0,0 +1,438 @@
|
|||
# Makefile.in generated by automake 1.10.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
VPATH = @srcdir@
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = include/cppunit/portability
|
||||
DIST_COMMON = $(libcppunitinclude_HEADERS) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = \
|
||||
$(top_srcdir)/config/ac_create_prefix_config_h.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_have_sstream.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_have_strstream.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_namespaces.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_rtti.m4 \
|
||||
$(top_srcdir)/config/ac_cxx_string_compare_string_first.m4 \
|
||||
$(top_srcdir)/config/ac_dll.m4 \
|
||||
$(top_srcdir)/config/ax_cxx_gcc_abi_demangle.m4 \
|
||||
$(top_srcdir)/config/ax_cxx_have_isfinite.m4 \
|
||||
$(top_srcdir)/config/bb_enable_doxygen.m4 \
|
||||
$(top_srcdir)/configure.in
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||
am__vpath_adj = case $$p in \
|
||||
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||
*) f=$$p;; \
|
||||
esac;
|
||||
am__strip_dir = `echo $$p | sed -e 's|^.*/||'`;
|
||||
am__installdirs = "$(DESTDIR)$(libcppunitincludedir)"
|
||||
libcppunitincludeHEADERS_INSTALL = $(INSTALL_HEADER)
|
||||
HEADERS = $(libcppunitinclude_HEADERS)
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
CC = @CC@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CPPUNIT_BINARY_AGE = @CPPUNIT_BINARY_AGE@
|
||||
CPPUNIT_INTERFACE_AGE = @CPPUNIT_INTERFACE_AGE@
|
||||
CPPUNIT_MAJOR_VERSION = @CPPUNIT_MAJOR_VERSION@
|
||||
CPPUNIT_MICRO_VERSION = @CPPUNIT_MICRO_VERSION@
|
||||
CPPUNIT_MINOR_VERSION = @CPPUNIT_MINOR_VERSION@
|
||||
CPPUNIT_VERSION = @CPPUNIT_VERSION@
|
||||
CXX = @CXX@
|
||||
CXXCPP = @CXXCPP@
|
||||
CXXDEPMODE = @CXXDEPMODE@
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DOT = @DOT@
|
||||
DOXYGEN = @DOXYGEN@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
ECHO = @ECHO@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
F77 = @F77@
|
||||
FFLAGS = @FFLAGS@
|
||||
GREP = @GREP@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBADD_DL = @LIBADD_DL@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LN_S = @LN_S@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LT_AGE = @LT_AGE@
|
||||
LT_CURRENT = @LT_CURRENT@
|
||||
LT_RELEASE = @LT_RELEASE@
|
||||
LT_REVISION = @LT_REVISION@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
NMEDIT = @NMEDIT@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
RANLIB = @RANLIB@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
VERSION = @VERSION@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_CXX = @ac_ct_CXX@
|
||||
ac_ct_F77 = @ac_ct_F77@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
enable_dot = @enable_dot@
|
||||
enable_html_docs = @enable_html_docs@
|
||||
enable_latex_docs = @enable_latex_docs@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
libcppunitincludedir = $(includedir)/cppunit/portability
|
||||
libcppunitinclude_HEADERS = \
|
||||
CppUnitDeque.h \
|
||||
CppUnitMap.h \
|
||||
CppUnitSet.h \
|
||||
CppUnitStack.h \
|
||||
CppUnitVector.h \
|
||||
FloatingPoint.h \
|
||||
Stream.h
|
||||
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu include/cppunit/portability/Makefile'; \
|
||||
cd $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu include/cppunit/portability/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
install-libcppunitincludeHEADERS: $(libcppunitinclude_HEADERS)
|
||||
@$(NORMAL_INSTALL)
|
||||
test -z "$(libcppunitincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libcppunitincludedir)"
|
||||
@list='$(libcppunitinclude_HEADERS)'; for p in $$list; do \
|
||||
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||
f=$(am__strip_dir) \
|
||||
echo " $(libcppunitincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libcppunitincludedir)/$$f'"; \
|
||||
$(libcppunitincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libcppunitincludedir)/$$f"; \
|
||||
done
|
||||
|
||||
uninstall-libcppunitincludeHEADERS:
|
||||
@$(NORMAL_UNINSTALL)
|
||||
@list='$(libcppunitinclude_HEADERS)'; for p in $$list; do \
|
||||
f=$(am__strip_dir) \
|
||||
echo " rm -f '$(DESTDIR)$(libcppunitincludedir)/$$f'"; \
|
||||
rm -f "$(DESTDIR)$(libcppunitincludedir)/$$f"; \
|
||||
done
|
||||
|
||||
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonemtpy = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
mkid -fID $$unique
|
||||
tags: TAGS
|
||||
|
||||
TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | \
|
||||
$(AWK) '{ files[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in files) print i; }; }'`; \
|
||||
test -z "$(CTAGS_ARGS)$$tags$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& cd $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) $$here
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
|
||||
fi; \
|
||||
cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
|
||||
else \
|
||||
test -f $(distdir)/$$file \
|
||||
|| cp -p $$d/$$file $(distdir)/$$file \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(HEADERS)
|
||||
installdirs:
|
||||
for dir in "$(DESTDIR)$(libcppunitincludedir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
`test -z '$(STRIP)' || \
|
||||
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am: install-libcppunitincludeHEADERS
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am: uninstall-libcppunitincludeHEADERS
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool ctags distclean distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-libcppunitincludeHEADERS install-man \
|
||||
install-pdf install-pdf-am install-ps install-ps-am \
|
||||
install-strip installcheck installcheck-am installdirs \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags uninstall uninstall-am uninstall-libcppunitincludeHEADERS
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
347
Common/cppunit-1.12.1/include/cppunit/portability/Stream.h
Normal file
347
Common/cppunit-1.12.1/include/cppunit/portability/Stream.h
Normal file
|
|
@ -0,0 +1,347 @@
|
|||
#ifndef CPPUNIT_PORTABILITY_STREAM_H_INCLUDED
|
||||
#define CPPUNIT_PORTABILITY_STREAM_H_INCLUDED
|
||||
|
||||
// This module define:
|
||||
// Type CppUT::Stream (either std::stream or a custom type)
|
||||
// Type CppUT::OStringStream (eitjer std::ostringstream, older alternate or a custom type)
|
||||
// Functions stdCOut() & stdCErr() which returns a reference on cout & cerr stream (or our
|
||||
// custom stream).
|
||||
|
||||
#include <cppunit/Portability.h>
|
||||
|
||||
|
||||
#if defined( CPPUNIT_NO_STREAM )
|
||||
|
||||
#include <string>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
CPPUNIT_NS_BEGIN
|
||||
|
||||
class StreamBuffer
|
||||
{
|
||||
public:
|
||||
virtual ~StreamBuffer() {}
|
||||
|
||||
virtual void write( const char *text, unsigned int length ) = 0;
|
||||
|
||||
virtual void flush() {}
|
||||
};
|
||||
|
||||
|
||||
class StringStreamBuffer : public StreamBuffer
|
||||
{
|
||||
public:
|
||||
std::string str() const
|
||||
{
|
||||
return str_;
|
||||
}
|
||||
|
||||
public: // overridden from StreamBuffer
|
||||
void write( const char *text, unsigned int length )
|
||||
{
|
||||
str_.append( text, length );
|
||||
}
|
||||
|
||||
private:
|
||||
std::string str_;
|
||||
};
|
||||
|
||||
|
||||
class FileStreamBuffer : public StreamBuffer
|
||||
{
|
||||
public:
|
||||
FileStreamBuffer( FILE *file )
|
||||
: file_( file )
|
||||
{
|
||||
}
|
||||
|
||||
FILE *file() const
|
||||
{
|
||||
return file_;
|
||||
}
|
||||
|
||||
public: // overridden from StreamBuffer
|
||||
void write( const char *text, unsigned int length )
|
||||
{
|
||||
if ( file_ )
|
||||
fwrite( text, sizeof(char), length, file_ );
|
||||
}
|
||||
|
||||
void flush()
|
||||
{
|
||||
if ( file_ )
|
||||
fflush( file_ );
|
||||
}
|
||||
|
||||
private:
|
||||
FILE *file_;
|
||||
};
|
||||
|
||||
|
||||
class OStream
|
||||
{
|
||||
public:
|
||||
OStream()
|
||||
: buffer_( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
OStream( StreamBuffer *buffer )
|
||||
: buffer_( buffer )
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~OStream()
|
||||
{
|
||||
flush();
|
||||
}
|
||||
|
||||
OStream &flush()
|
||||
{
|
||||
if ( buffer_ )
|
||||
buffer_->flush();
|
||||
return *this;
|
||||
}
|
||||
|
||||
void setBuffer( StreamBuffer *buffer )
|
||||
{
|
||||
buffer_ = buffer;
|
||||
}
|
||||
|
||||
OStream &write( const char *text, unsigned int length )
|
||||
{
|
||||
if ( buffer_ )
|
||||
buffer_->write( text, length );
|
||||
return *this;
|
||||
}
|
||||
|
||||
OStream &write( const char *text )
|
||||
{
|
||||
return write( text, strlen(text) );
|
||||
}
|
||||
|
||||
OStream &operator <<( bool v )
|
||||
{
|
||||
const char *out = v ? "true" : "false";
|
||||
return write( out );
|
||||
}
|
||||
|
||||
OStream &operator <<( short v )
|
||||
{
|
||||
char buffer[64];
|
||||
sprintf( buffer, "%hd", v );
|
||||
return write( buffer );
|
||||
}
|
||||
|
||||
OStream &operator <<( unsigned short v )
|
||||
{
|
||||
char buffer[64];
|
||||
sprintf( buffer, "%hu", v );
|
||||
return write( buffer );
|
||||
}
|
||||
|
||||
OStream &operator <<( int v )
|
||||
{
|
||||
char buffer[64];
|
||||
sprintf( buffer, "%d", v );
|
||||
return write( buffer );
|
||||
}
|
||||
|
||||
OStream &operator <<( unsigned int v )
|
||||
{
|
||||
char buffer[64];
|
||||
sprintf( buffer, "%u", v );
|
||||
return write( buffer );
|
||||
}
|
||||
|
||||
OStream &operator <<( long v )
|
||||
{
|
||||
char buffer[64];
|
||||
sprintf( buffer, "%ld", v );
|
||||
return write( buffer );
|
||||
}
|
||||
|
||||
OStream &operator <<( unsigned long v )
|
||||
{
|
||||
char buffer[64];
|
||||
sprintf( buffer, "%lu", v );
|
||||
return write( buffer );
|
||||
}
|
||||
|
||||
OStream &operator <<( float v )
|
||||
{
|
||||
char buffer[128];
|
||||
sprintf( buffer, "%.16g", double(v) );
|
||||
return write( buffer );
|
||||
}
|
||||
|
||||
OStream &operator <<( double v )
|
||||
{
|
||||
char buffer[128];
|
||||
sprintf( buffer, "%.16g", v );
|
||||
return write( buffer );
|
||||
}
|
||||
|
||||
OStream &operator <<( long double v )
|
||||
{
|
||||
char buffer[128];
|
||||
sprintf( buffer, "%.16g", double(v) );
|
||||
return write( buffer );
|
||||
}
|
||||
|
||||
OStream &operator <<( const void *v )
|
||||
{
|
||||
char buffer[64];
|
||||
sprintf( buffer, "%p", v );
|
||||
return write( buffer );
|
||||
}
|
||||
|
||||
OStream &operator <<( const char *v )
|
||||
{
|
||||
return write( v ? v : "NULL" );
|
||||
}
|
||||
|
||||
OStream &operator <<( char c )
|
||||
{
|
||||
char buffer[16];
|
||||
sprintf( buffer, "%c", c );
|
||||
return write( buffer );
|
||||
}
|
||||
|
||||
OStream &operator <<( const std::string &s )
|
||||
{
|
||||
return write( s.c_str(), s.length() );
|
||||
}
|
||||
|
||||
private:
|
||||
StreamBuffer *buffer_;
|
||||
};
|
||||
|
||||
|
||||
class OStringStream : public OStream
|
||||
{
|
||||
public:
|
||||
OStringStream()
|
||||
: OStream( &buffer_ )
|
||||
{
|
||||
}
|
||||
|
||||
std::string str() const
|
||||
{
|
||||
return buffer_.str();
|
||||
}
|
||||
|
||||
private:
|
||||
StringStreamBuffer buffer_;
|
||||
};
|
||||
|
||||
|
||||
class OFileStream : public OStream
|
||||
{
|
||||
public:
|
||||
OFileStream( FILE *file )
|
||||
: OStream( &buffer_ )
|
||||
, buffer_( file )
|
||||
, ownFile_( false )
|
||||
{
|
||||
}
|
||||
|
||||
OFileStream( const char *path )
|
||||
: OStream( &buffer_ )
|
||||
, buffer_( fopen( path, "wt" ) )
|
||||
, ownFile_( true )
|
||||
{
|
||||
}
|
||||
|
||||
virtual ~OFileStream()
|
||||
{
|
||||
if ( ownFile_ && buffer_.file() )
|
||||
fclose( buffer_.file() );
|
||||
}
|
||||
|
||||
private:
|
||||
FileStreamBuffer buffer_;
|
||||
bool ownFile_;
|
||||
};
|
||||
|
||||
inline OStream &stdCOut()
|
||||
{
|
||||
static OFileStream stream( stdout );
|
||||
return stream;
|
||||
}
|
||||
|
||||
inline OStream &stdCErr()
|
||||
{
|
||||
static OFileStream stream( stderr );
|
||||
return stream;
|
||||
}
|
||||
|
||||
CPPUNIT_NS_END
|
||||
|
||||
#elif CPPUNIT_HAVE_SSTREAM // #if defined( CPPUNIT_NO_STREAM )
|
||||
# include <sstream>
|
||||
# include <fstream>
|
||||
|
||||
CPPUNIT_NS_BEGIN
|
||||
typedef std::ostringstream OStringStream; // The standard C++ way
|
||||
typedef std::ofstream OFileStream;
|
||||
CPPUNIT_NS_END
|
||||
|
||||
|
||||
#elif CPPUNIT_HAVE_CLASS_STRSTREAM
|
||||
# include <string>
|
||||
# if CPPUNIT_HAVE_STRSTREAM
|
||||
# include <strstream>
|
||||
# else // CPPUNIT_HAVE_STRSTREAM
|
||||
# include <strstream.h>
|
||||
# endif // CPPUNIT_HAVE_CLASS_STRSTREAM
|
||||
|
||||
CPPUNIT_NS_BEGIN
|
||||
|
||||
class OStringStream : public std::ostrstream
|
||||
{
|
||||
public:
|
||||
std::string str()
|
||||
{
|
||||
// (*this) << '\0';
|
||||
// std::string msg(std::ostrstream::str());
|
||||
// std::ostrstream::freeze(false);
|
||||
// return msg;
|
||||
// Alternative implementation that don't rely on freeze which is not
|
||||
// available on some platforms:
|
||||
return std::string( std::ostrstream::str(), pcount() );
|
||||
}
|
||||
};
|
||||
|
||||
CPPUNIT_NS_END
|
||||
#else // CPPUNIT_HAVE_CLASS_STRSTREAM
|
||||
# error Cannot define CppUnit::OStringStream.
|
||||
#endif // #if defined( CPPUNIT_NO_STREAM )
|
||||
|
||||
|
||||
|
||||
#if !defined( CPPUNIT_NO_STREAM )
|
||||
|
||||
#include <iostream>
|
||||
|
||||
CPPUNIT_NS_BEGIN
|
||||
|
||||
typedef std::ostream OStream;
|
||||
|
||||
inline OStream &stdCOut()
|
||||
{
|
||||
return std::cout;
|
||||
}
|
||||
|
||||
inline OStream &stdCErr()
|
||||
{
|
||||
return std::cerr;
|
||||
}
|
||||
|
||||
CPPUNIT_NS_END
|
||||
|
||||
#endif // #if !defined( CPPUNIT_NO_STREAM )
|
||||
|
||||
#endif // CPPUNIT_PORTABILITY_STREAM_H_INCLUDED
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue